wger
wger copied to clipboard
Allow multiple weight entries per day
Proposed Changes
- Refer to Issue #1814
- Changed the
WeightEntrydate attribute from aDateFieldto aDateTimeField - Removed the
unique_togetherof 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
- This will still need implementation on the frontend. Adding multiple weight entries per day works but are currently all added with the time as
23:00:00. How this is displayed on the graph may want to be taken into consideration as well.- flutter#641
- react#990
Please check that the PR fulfills these requirements
- [x] 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.
- [x] 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
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?
Will you take a shot at the frontend as well or should I do it?
I'll give it a whirl!
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