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 user to give meals a description #774

Merged
merged 6 commits into from
Aug 24, 2021

Conversation

Gr8ayu
Copy link
Contributor

@Gr8ayu Gr8ayu commented Aug 22, 2021

Allow user to give meals a description/name such as breakfast or after workout
resolving #773

Proposed Changes

  • add name field to meal model class
  • add 'name' in MealSerializer
  • add 'name' in MealInfoSerializer

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Added yourself to AUTHORS.rst

Other questions

  • Do users need to run some commmands in their local instances due to this PR
    (e.g. database migration)?
    YES

Gr8ayu and others added 2 commits August 23, 2021 02:28
Allow user to give meals a description/name such as breakfast or after
workout
@rolandgeider
Copy link
Member

That was quick 😄

Can you commit the migration file as well? Also, we should show the meal name in the template

@Gr8ayu
Copy link
Contributor Author

Gr8ayu commented Aug 22, 2021

yeah I'll add those migrations, and by template you mean frontend right ?

@rolandgeider
Copy link
Member

Yes

@rolandgeider
Copy link
Member

And the last thing we need to do: add the new field to the list of fields in the forms in MealCreateView and MealEditView, otherwise it would not be possible to set it

@Gr8ayu
Copy link
Contributor Author

Gr8ayu commented Aug 23, 2021

image

I've added meal name like this in the template

@Gr8ayu
Copy link
Contributor Author

Gr8ayu commented Aug 23, 2021

And the last thing we need to do: add the new field to the list of fields in the forms in MealCreateView and MealEditView, otherwise it would not be possible to set it

Okay

@rolandgeider
Copy link
Member

Great, thanks!

@rolandgeider rolandgeider merged commit 2535987 into wger-project:master Aug 24, 2021
@rolandgeider rolandgeider linked an issue Aug 24, 2021 that may be closed by this pull request
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 user to give meals a description
2 participants