Add fasting feature: FastingWindow model, tests, and views#2138
Open
gracechen636 wants to merge 4 commits intowger-project:masterfrom
Open
Add fasting feature: FastingWindow model, tests, and views#2138gracechen636 wants to merge 4 commits intowger-project:masterfrom
gracechen636 wants to merge 4 commits intowger-project:masterfrom
Conversation
Member
|
NB: I'm planning to finish implementing the UI for the trophies, doing a release, and then merging this for the next one |
# Conflicts: # .github/workflows/docker-base.yml # .github/workflows/docker-demo.yml # .github/workflows/docker.yml # AUTHORS.md # package-lock.json # package.json # pyproject.toml # uv.lock # wger/core/forms.py # wger/core/templates/template.html # wger/core/urls.py # wger/core/views/misc.py # wger/locale/de/LC_MESSAGES/django.po # wger/locale/fi/LC_MESSAGES/django.po # wger/locale/he/LC_MESSAGES/django.po # wger/locale/hi/LC_MESSAGES/django.po # wger/locale/nl/LC_MESSAGES/django.po
These were probably changed by some merge
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
Add FastingWindow model to represent user fasting periods, including start/end times, optional goal duration, etc.
Provide convenience properties for active status and duration calculations.
Add unit tests covering model creation, behavior, and ordering.
Related Issue(s)
#2134
Do users need to run some commands in their local instances due to this PR
(e.g. database migration, deployment changes)?
Maybe.
This PR introduces a new model, so users may need to run database migrations:
python manage.py makemigrations
python manage.py migrate