diff --git a/app.py b/app.py index 7f4bd7e..80963d1 100644 --- a/app.py +++ b/app.py @@ -19,14 +19,12 @@ metadata = MetaData(naming_convention=convention) def get_locale(): - return session.get('language', request.accept_languages.best_match(['en', 'ru', 'et', 'lv', 'fi'])) + return session.get('language', request.accept_languages.best_match(['en', 'ru', 'ee', 'lv', 'fi','se','lt'])) app = Flask(__name__) app.config['SECRET_KEY'] = 'secret_key' -#app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite3' -#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+mysqlconnector://sarbaseuser:password@localhost/sarbaseapp' app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', 'mysql+mysqlconnector://sarbaseuser:password@localhost/sarbaseapp') app.config['BABEL_DEFAULT_LOCALE'] = 'en' babel= Babel(app) @@ -56,6 +54,5 @@ def set_language(lang_code): - if __name__ == '__main__': app.run() diff --git a/templates/base.html b/templates/base.html index 4b59f57..821564d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,14 +2,8 @@
- - - - + +ID: {{ sar.id }}
-Created at: {{ sar.created }}
-Last updated: {{ sar.updated }}
-Start Date: {{ sar.start_date }}
-Manager: {{ sar.manager }}
- +
+
+
+
+
+
+
+ Created at: {{ sar.created }} +Last updated: {{ sar.updated }} +Status: {{ sar.status }} +Category: {{ sar.category }} +Start Date: {{ sar.start_date }} +Finish Date: {{ sar.finish_date }} +Result: {{ sar.result }} +Manager: {{ sar.manager_id }} + |
+
+
+
+
+
+ IPP longitude: {{ sar.longitude }} +IPP latitude: {{ sar.latitude }} +Longitude found: {{ sar.longitude_found }} +Latitude found: {{ sar.latitude_found }} +Description: {{ sar.description }} +Description private: {{ sar.description_hidden }} + |
+
+
{{ comment.text }}
+
{{ comment.text }}