From e85a2fdda4dab9de04d2d09274ecf088c0bf6dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20G=C3=B6tz?= Date: Tue, 5 Feb 2019 17:57:41 +0100 Subject: [PATCH] Fix no date bug --- src/main.py | 2 ++ src/templates/index.html | 64 +++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/main.py b/src/main.py index 3859c6f..59dff9a 100644 --- a/src/main.py +++ b/src/main.py @@ -26,6 +26,7 @@ def main(): def production(): import config + print('PRODUKTION') DB_HOST = os.environ.get('DB_HOST') DB_NAME = os.environ.get('POSTGRES_DB') DB_USER = os.environ.get('POSTGRES_USER') @@ -46,6 +47,7 @@ def production(): 'lastchangeAt': note[5], 'permission': note[6], 'content': note[7]}) return render_template('index.html', notes=notes_arr, host=config.CODI_URL) except Exception as e: + print(e) return render_template('index.html') diff --git a/src/templates/index.html b/src/templates/index.html index ec1490b..8befecb 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -16,38 +16,40 @@ - + -
- - - - - - - - - - - - - {% for note in notes %} - - - - - - - - - {% endfor %} - -
idtitlealiaslast change atpermissioncontent
{{note['shortid']}}{{note['title']}}{{note['alias']}}{{note['lastchangeAt'].strftime('%d.%m.%Y %H:%M')}}{{note['permission']}}{%if note['content']%}💬{%else%}❌{%endif%}
-
+
+ + + + + + + + + + + + + {% for note in notes %} + + + + + + + + + {% endfor %} + +
idtitlealiaslast change atpermissioncontent
{{note['shortid']}}{{note['title']}}{{note['alias']}}{% if note['lastchangeAt'] %}{{note['lastchangeAt'].strftime('%d.%m.%Y %H:%M')}}{% endif %} + {{note['permission']}}{%if note['content']%}💬{%else%}❌{%endif%}
+