Skip to content

Conversation

@scrapcode
Copy link
Contributor

@scrapcode scrapcode commented Feb 23, 2025

Proposed Changes

  • Refer to Issue Allow more than one weight entry per day #1814
  • Changed the WeightEntry date attribute from a DateField to a DateTimeField
  • Removed the unique_together of user and date.
  • Removed the restriction of only being allowed to add a new weight entry every so often. You can now add multiple weight entries per day.
    • Removed or altered tests that tested this functionality
  • Changed the method of getting and constructing dates from naive to aware, and to include times.
  • Added DATETIME_FORMATS constants.
  • Modified seeded testing data to reflect aware datetime formats.

TODO: Frontend Implementation

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
    • Multiple tests and testing methods had to be modified or removed to allow for the new functionality.
  • Added yourself to AUTHORS.rst

Other questions

  • Do users need to run some commands in their local instances due to this PR
    (e.g. database migration)?
  • python manage.py migrate

@rolandgeider
Copy link
Member

you're on fire!

Also, there were more changes needed that I had thought. Will you take a shot at the frontend as well or should I do it?

@scrapcode
Copy link
Contributor Author

Will you take a shot at the frontend as well or should I do it?

I'll give it a whirl!

@rolandgeider rolandgeider linked an issue Apr 12, 2025 that may be closed by this pull request
# Conflicts:
#	AUTHORS.rst
#	wger/core/demo.py
#	wger/core/tests/test_temporary_users.py
#	wger/weight/forms.py
#	wger/weight/tests/test_entry.py
@rolandgeider
Copy link
Member

we can finally merge this 🥳 (and sorry for the wait)

PS: the last test is failing because it can't upload the coverage report, so all is fine

@rolandgeider rolandgeider merged commit d256a11 into wger-project:master Sep 26, 2025
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow more than one weight entry per day

2 participants