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

BUG: Time is showing seconds #23

Open
SandraBergstrom opened this issue Apr 28, 2023 · 1 comment
Open

BUG: Time is showing seconds #23

SandraBergstrom opened this issue Apr 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@SandraBergstrom
Copy link
Owner

Prep time and cooking time is showing seconds and not minutes.

@SandraBergstrom SandraBergstrom added the bug Something isn't working label Apr 28, 2023
@SandraBergstrom
Copy link
Owner Author

SandraBergstrom commented May 16, 2023

I took the following steps:
Models:

  1. Rename prep_time to prep_time_hours and change from DurationField to PositiveIntegerField
  2. Added a copy of above and renamed to prep_time_minutes.
  3. Repeat the two first steps for cooking_time as well.
  4. Added f-strings to return them as XX h XX min.

Views:
5. Added "_hours" the fields prep_time and cooking_time
6. Added the fields for prep_time_minutes and cooking_time_minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant