Create seperate page view for workout (WIP)

This commit is contained in:
Peter Stockings
2024-11-02 23:09:26 +11:00
parent 1384eb007b
commit 817a6016e2
4 changed files with 193 additions and 0 deletions

5
app.py
View File

@@ -433,6 +433,11 @@ def get_stats_for_person(person_id):
stats = db.stats.fetch_stats_for_person(person_id)
return render_template('partials/stats.html', stats=stats)
@ app.route("/person/<int:person_id>/workout/<int:workout_id>", methods=['GET'])
def show_workout(person_id, workout_id):
view_model = db.workout.get(person_id, workout_id)
return render_template('workout.html', **view_model)
@app.teardown_appcontext
def closeConnection(exception):