diff options
| author | stilbruch <stilbruch@protonmail.com> | 2022-04-06 14:17:40 -0500 |
|---|---|---|
| committer | stilbruch <stilbruch@protonmail.com> | 2022-04-06 14:17:40 -0500 |
| commit | ed1823168fb6f3256bcd7397b4d4de462a3f1781 (patch) | |
| tree | efc29ae330c9f16db3d27cae9210b9075276adbb /app/routes.py | |
| parent | 45bf2ad8707b67b2f756c80edb877a6bfe3897fb (diff) | |
| download | Strengthy-ed1823168fb6f3256bcd7397b4d4de462a3f1781.tar.xz Strengthy-ed1823168fb6f3256bcd7397b4d4de462a3f1781.zip | |
Exercises are now properly stored in the database
Diffstat (limited to 'app/routes.py')
| -rw-r--r-- | app/routes.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/routes.py b/app/routes.py index 36fb0ba..8a2346a 100644 --- a/app/routes.py +++ b/app/routes.py @@ -70,7 +70,7 @@ def createWorkout(): workout = Workout.query.filter_by(user_id=current_user.id, name=name).first() if not workout: # TODO: add exercises - workout = Workout(current_user, name, None) + workout = Workout(current_user, name, [e.data for e in form.exercises.entries]) db.session.add(workout) db.session.commit() @@ -79,3 +79,8 @@ def createWorkout(): flash("Workout with this name already exists", "danger") return render_template('workout/create.html', form=form) + +@app.route("/workout/manage", methods=['GET']) +@login_required +def manageWorkout(): + return render_template('workout/manage.html') |
