Added redirect to index after habit creation

This commit is contained in:
Verox001 2024-01-26 07:59:17 +01:00
parent a64349e550
commit f66d03c84d

6
app.py
View File

@ -207,7 +207,9 @@ def habit_create():
habit = Habit.create(current_user.id, name, times, note, unit) habit = Habit.create(current_user.id, name, times, note, unit)
# Back to index # Back to index
return render_template( return redirect(url_for('index'))
"""return render_template(
'habit.html', 'habit.html',
title='Erstelle ein Habit', title='Erstelle ein Habit',
name=name, name=name,
@ -215,7 +217,7 @@ def habit_create():
times=times, times=times,
unit=unit, unit=unit,
errors=errors, errors=errors,
) )"""
# Run the application # Run the application