diff --git a/app.py b/app.py index cc785bf..6bbceeb 100644 --- a/app.py +++ b/app.py @@ -41,7 +41,7 @@ def index(): # habits = [("lesen", "eine Seite vor dem schlafen gehen"), ("sport", "3x Gym")] return render_template( 'index.html', - title='Hallo ' + current_user.name, + title=f"Hallo {current_user.name}", utc_dt=datetime.datetime.now().strftime("%d.%m.%Y %H:%M %A"), habits=habits, errors={}, @@ -149,7 +149,6 @@ def habit_creation(): title='Erstelle ein Habit', unit=1, errors={}, - habits=current_user.get_habits() ) @@ -186,8 +185,7 @@ def habit_create(): note=note, times=times, unit=unit, - errors=errors, - habits=current_user.get_habits() + errors=errors ) # Map unit to integer @@ -214,7 +212,6 @@ def habit_create(): times=times, unit=unit, errors=errors, - habits=current_user.get_habits() ) diff --git a/templates/habit.html b/templates/habit.html new file mode 100644 index 0000000..280f06c --- /dev/null +++ b/templates/habit.html @@ -0,0 +1,36 @@ +{% extends 'layouts/main.html' %} + +{% block content %} + + +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 93bd9a8..ef4604e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,7 +1,7 @@ {% extends 'layouts/main.html' %} {% block content %} -