diff --git a/app.py b/app.py index 55d4a04..cc785bf 100644 --- a/app.py +++ b/app.py @@ -141,6 +141,18 @@ def logout(): return redirect(url_for('index')) +@app.route('/habit') +@login_required +def habit_creation(): + return render_template( + 'habit.html', + title='Erstelle ein Habit', + unit=1, + errors={}, + habits=current_user.get_habits() + ) + + @app.route('/habit', methods=['POST']) @login_required def habit_create(): @@ -168,7 +180,8 @@ def habit_create(): if errors: return render_template( - 'index.html', + 'habit.html', + title='Erstelle ein Habit', name=name, note=note, times=times, @@ -194,7 +207,8 @@ def habit_create(): # Back to index return render_template( - 'index.html', + 'habit.html', + title='Erstelle ein Habit', name=name, note=note, times=times,