Add heart rate and duration fields to log model#2128
Open
elias170105 wants to merge 1 commit intowger-project:masterfrom
Open
Add heart rate and duration fields to log model#2128elias170105 wants to merge 1 commit intowger-project:masterfrom
elias170105 wants to merge 1 commit intowger-project:masterfrom
Conversation
Added fields for maximum and average heart rate, and duration, for the Cardiotrecking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
bpm_max(PositiveInteger),bpm_avg(PositiveInteger), andduration(DurationField) to theWorkoutLogmodel to allow tracking of cardio exercises.WorkoutLogSerializerinserializers.pyto expose these fields via the API.These fields are optional (
blank=True, null=True), so they won't enforce data entry for strength training logs.Note: I could not locate the
WorkoutLogFormdefinition (it seems missing fromwger/manager/forms.pyin the current file structure). Therefore, this PR currently only enables these fields in the Backend and API, but not yet in the classic Web UI.Related Issue(s)
(If you have an issue number, replace this line with: Closes #YOUR_ISSUE_NUMBER. If not, you can delete this section.)
Please check that the PR fulfills these requirements
ruff format && isort .)Other questions
(e.g. database migration, deployment changes)?
Yes, database migrations are required:
python manage.py migrate