From 14e5195d37280cdeb61383d59332ed492370de8a Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Sun, 4 Dec 2022 21:25:08 +1100 Subject: [PATCH] Remove workout page --- app.py | 10 --- templates/partials/page/workout.html | 117 --------------------------- templates/workout.html | 9 --- 3 files changed, 136 deletions(-) delete mode 100644 templates/partials/page/workout.html delete mode 100644 templates/workout.html diff --git a/app.py b/app.py index c16df7e..2ada443 100644 --- a/app.py +++ b/app.py @@ -118,16 +118,6 @@ def create_workout(person_id): workout=workout), 200, {"HX-Trigger": "updatedPeople"} -@ app.route("/person//workout/") -@ validate_workout -def get_workout(person_id, workout_id): - workout = db.get_workout(person_id, workout_id) - if htmx: - return render_template('partials/page/workout.html', - workout=workout), 200, {"HX-Trigger": "updatedPeople"} - return render_template('workout.html', workout=workout) - - @ app.route("/person//workout//delete", methods=['DELETE']) @ validate_workout def delete_workout(person_id, workout_id): diff --git a/templates/partials/page/workout.html b/templates/partials/page/workout.html deleted file mode 100644 index 191446d..0000000 --- a/templates/partials/page/workout.html +++ /dev/null @@ -1,117 +0,0 @@ -
- -
-
-

{{ workout['PersonName'] }}

-
- -
- -
- {{ render_partial('partials/start_date.html', person_id=workout['PersonId'], workout_id=workout['WorkoutId'], - start_date=workout['StartDate']) }} -
- -
- -
-
-

Top Sets

- -
-
- - - - - - - - - - - {% for t in workout['TopSets'] %} - {{ render_partial('partials/topset.html', person_id=workout['PersonId'], - workout_id=workout['WorkoutId'], - topset_id=t['TopSetId'], exercise_name=t['ExerciseName'], repetitions=t['Repetitions'], - weight=t['Weight']) }} - {% endfor %} - -
- Exercise - Top Set -
- - {% if workout['TopSets']|length == 0 %} - - {% endif %} -
-
- -
-
-
- -
-
- -
- -
- - - -
-
-
- -
- - -
- -
- - -
-
- -
-
-
\ No newline at end of file diff --git a/templates/workout.html b/templates/workout.html deleted file mode 100644 index 56a50d9..0000000 --- a/templates/workout.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} - -{{ render_partial('partials/page/workout.html', -workout=workout) }} - - -{% endblock %} \ No newline at end of file