From 5b633c8f42991a9c9da01e1fff3d2bcbf358cd6d Mon Sep 17 00:00:00 2001 From: janphilippweinsheimer Date: Tue, 23 Jan 2024 10:22:16 +0100 Subject: [PATCH] =?UTF-8?q?Oben=20wird=20man=20gebittet=20sich=20anzumelde?= =?UTF-8?q?n=20wenn=20man=20nicht=20angemeldet=20ist.=20ansonsten=20wird?= =?UTF-8?q?=20man=20mit=20seinem=20Namen=20gegr=C3=BC=C3=9Ft.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 918a9d1..4fd3abb 100644 --- a/app.py +++ b/app.py @@ -35,12 +35,15 @@ def index(): if current_user.is_authenticated: habits = current_user.get_habits() + name = "Hallo " + current_user.name else: habits = [] + name = "Bitte melde dich an." # habits = [("lesen", "eine Seite vor dem schlafen gehen"), ("sport", "3x Gym")] return render_template( 'index.html', + title=name, utc_dt=datetime.datetime.now().strftime("%d.%m.%Y %H:%M %A"), habits=habits, errors={}, @@ -221,13 +224,6 @@ def habit_create(): errors=errors, ) -@app.route('/test1') -def test1(): - return render_template('layouts/indextest1.html', errors={}) - -@app.route('/test2') -def test2(): - return render_template('layouts/indextest2.html', errors={}) # Run the application if __name__ == '__main__':