From 83841d6369a188c846e6bc7a2d9712d23b05c872 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Sat, 16 Jul 2022 16:47:28 +1000 Subject: [PATCH] Add page/route to display selected topset from a workout for a person --- app.py | 5 +++ templates/topset.html | 72 +++++++++++++++++++++++++++++++++++++++++ templates/workout.html | 9 +++--- templates/workouts.html | 25 ++++++-------- 4 files changed, 91 insertions(+), 20 deletions(-) create mode 100644 templates/topset.html diff --git a/app.py b/app.py index 8687f83..275e699 100644 --- a/app.py +++ b/app.py @@ -44,6 +44,11 @@ def show_workout_for_person(person_id, workout_id): return render_template('workout.html', person_id=person_id, workout_id=workout_id) +@app.route("/person//workout//topset/") +def show_topset_from_workout_for_person(person_id, workout_id, topset_id): + return render_template('topset.html', person_id=person_id, workout_id=workout_id, topset_id=topset_id) + + @app.teardown_appcontext def close_connection(exception): db = getattr(g, '_database', None) diff --git a/templates/topset.html b/templates/topset.html new file mode 100644 index 0000000..8a7e544 --- /dev/null +++ b/templates/topset.html @@ -0,0 +1,72 @@ +{% extends 'base.html' %} + +{% block content %} + +
+ +
+
+

Gabe

+ Apr 23 ,2021 +
+ + Delete topset + +
+ +
+ +
+
+
+ +
+
+ +
+ +
+ + + +
+
+
+ +
+ + +
+ +
+ + +
+
+ +
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/templates/workout.html b/templates/workout.html index c4667c5..dff437c 100644 --- a/templates/workout.html +++ b/templates/workout.html @@ -43,7 +43,7 @@ 5 x 60kg - Edit @@ -59,7 +59,7 @@ 5 x 60kg - Edit @@ -76,7 +76,7 @@ 5 x 60kg - Edit @@ -135,7 +135,8 @@ id="grid-zip" type="number"> - diff --git a/templates/workouts.html b/templates/workouts.html index 9f5f2f9..1ab02b4 100644 --- a/templates/workouts.html +++ b/templates/workouts.html @@ -62,7 +62,7 @@ 5 x 60kg - Edit @@ -89,7 +89,7 @@ 5 x 60kg - Edit @@ -116,7 +116,7 @@ 5 x 60kg - Edit @@ -143,7 +143,7 @@ 5 x 60kg - Edit @@ -170,7 +170,7 @@ 5 x 60kg - Edit @@ -197,7 +197,7 @@ 5 x 60kg - Edit @@ -224,7 +224,7 @@ 5 x 60kg - Edit @@ -237,15 +237,8 @@