diff --git a/app.py b/app.py index c87d6a6..d3839a1 100644 --- a/app.py +++ b/app.py @@ -300,6 +300,29 @@ def profile_change(): ) +@app.route('/edit-habit') +@login_required +def edit_habit(): + habit_id = request.args.get("habit") + #habit_id = request.get_json()["editHabitId"] + + habit = Habit.get(habit_id) + return render_template( + "edit-habit.html", + title=habit.name + ) +''' +@app.route('/edit-habit', methods=['POST']) +@login_required +def edit_habit_change(): + #habit_id = request.get_json()["habitId"] + + #habit = Habit.get(habit_id) + + return render_template( + "edit-habit.html" + ) +''' @app.route('/check_password', methods=['POST']) @login_required def check_password(): diff --git a/templates/components/habit_lists.html b/templates/components/habit_lists.html index 96f997f..3ae3bb8 100644 --- a/templates/components/habit_lists.html +++ b/templates/components/habit_lists.html @@ -125,7 +125,6 @@ {% if not habit.streak == 0 %} {{ habit.streak }} 🔥 {% endif %} - @@ -135,13 +134,12 @@ - - + +