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)
|
||||
|
||||
# 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user