Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple weight entries per day #1895

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scrapcode
Copy link
Contributor

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

  • 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

  • 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!

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.

2 participants