Added redirect to index after habit creation
This commit is contained in:
parent
a64349e550
commit
f66d03c84d
6
app.py
6
app.py
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user