From f66d03c84dad1070ef84f92d7f5cf7fe277f26ea Mon Sep 17 00:00:00 2001 From: Verox001 Date: Fri, 26 Jan 2024 07:59:17 +0100 Subject: [PATCH] Added redirect to index after habit creation --- app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 503e64e..586880c 100644 --- a/app.py +++ b/app.py @@ -207,7 +207,9 @@ def habit_create(): habit = Habit.create(current_user.id, name, times, note, unit) # Back to index - return render_template( + return redirect(url_for('index')) + + """return render_template( 'habit.html', title='Erstelle ein Habit', name=name, @@ -215,7 +217,7 @@ def habit_create(): times=times, unit=unit, errors=errors, - ) + )""" # Run the application