[workouts] Add the base for a workouts tracking app

This commit is contained in:
2026-08-07 11:44:16 -04:00
parent 5def87e7f1
commit 89e95d2424
2 changed files with 8 additions and 6 deletions

View File

@ -698,25 +698,25 @@ The Edit log form should have from top to bottom:
*** Description
** TODO [#A] Add trends tests for concurrent trends :trends:tests:concurrent:
** TODO [#B] Add workouts app with exercise catalog and workout routines :workouts:feature:
** DONE [#B] Add workouts app with exercise catalog and workout routines :workouts:feature:
:PROPERTIES:
:ID: ca613753-d203-4429-b062-36e3312bca82
:END:
*** Description
Add a `workouts` Django app so we can scrobble gym sessions.
Added a `workouts` Django app so we can scrobble gym sessions.
- New `Exercise` model with the wrkout/exercises.json catalog, imported via
`python manage.py import_wrkout_exercises`. Image files come from inside the
tarball and are stored via ImageKit specs.
- New `Exercise` model with the wrkout/exercises.json catalog (873 exercises),
imported via `python manage.py import_wrkout_exercises`. Image files come from
inside the tarball and are stored via ImageKit specs.
- New `WorkoutRoutine` model (ScrobblableMixin, media_type_label "Workout"),
scrobbled through the existing Scrobble system with a `workout_routine` FK and
`WorkoutLogData` storing sets/reps/weight per exercise plus duration, bodyweight
and RPE.
- Weights are stored canonically in kg; the profile's `weigh_in_units` setting
drives form input and display units. A generic
`apply_media_unit_conversions` helper in scrobbles/utils.py should handle both
`apply_media_unit_conversions` helper in scrobbles/utils.py handles both
drinks (`size_ml`) and workout weights, fixing the old GET-only drinks
conversion so imperial POSTs store kg.
- Templates, admin, DRF viewsets (`exercises`, `workout-routines`), MCP tools,