diff options
| author | stilbruch <stilbruch@protonmail.com> | 2022-04-24 19:27:41 -0500 |
|---|---|---|
| committer | stilbruch <stilbruch@protonmail.com> | 2022-04-24 19:27:41 -0500 |
| commit | 0dd74e2b672053e3296bc814a36988ba8463854f (patch) | |
| tree | ccd0c41d15324513f419fa2b157d65268b6b63b2 /app/forms/workout.py | |
| parent | 586285028845c8ed9a2e859f1266c233b8278311 (diff) | |
| download | Strengthy-0dd74e2b672053e3296bc814a36988ba8463854f.tar.xz Strengthy-0dd74e2b672053e3296bc814a36988ba8463854f.zip | |
Workout records are now written to the database
Diffstat (limited to 'app/forms/workout.py')
| -rw-r--r-- | app/forms/workout.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/forms/workout.py b/app/forms/workout.py index cf9f635..5537114 100644 --- a/app/forms/workout.py +++ b/app/forms/workout.py @@ -7,7 +7,7 @@ from wtforms import ( SelectField, StringField, ) -from wtforms.validators import DataRequired, Email +from wtforms.validators import DataRequired, Email, Optional # /workout/create class ExerciseCreateForm(Form): @@ -28,11 +28,12 @@ class WorkoutCreateForm(FlaskForm): # /workout/record class SetForm(Form): - lbs = IntegerField("lbs") - reps = IntegerField("reps") + lbs = IntegerField("lbs", [Optional()]) + units = IntegerField("units", [Optional()]) class ExerciseRecordForm(Form): + id = HiddenField("id", [DataRequired()]) sets = FieldList(FormField(SetForm)) |
