diff --git a/food_planner/migrations/0004_recipe_calories.py b/food_planner/migrations/0004_recipe_calories.py new file mode 100644 index 0000000..7ee8099 --- /dev/null +++ b/food_planner/migrations/0004_recipe_calories.py @@ -0,0 +1,19 @@ +# Generated by Django 3.0.3 on 2020-02-23 12:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('food_planner', '0003_mealplan'), + ] + + operations = [ + migrations.AddField( + model_name='recipe', + name='calories', + field=models.PositiveIntegerField(default=0, help_text='How many calories are contained in one portion?', verbose_name='Calories'), + preserve_default=False, + ), + ] diff --git a/food_planner/models.py b/food_planner/models.py index 7c72e9a..af16f50 100644 --- a/food_planner/models.py +++ b/food_planner/models.py @@ -82,6 +82,8 @@ class Recipe(models.Model): ('EXP', _('Expert')) ]) + calories = models.PositiveIntegerField(_('Calories'), + help_text=_('How many calories are contained in one portion?')) fat = models.PositiveIntegerField(_('Fat'), help_text=_('How much fat does one portion contain?')) carbohydrates = models.PositiveIntegerField(_('Carbohydrates'),