generated from 2martens/django-template
Added order with respect to
This commit is contained in:
25
food_planner/migrations/0006_auto_20200223_1331.py
Normal file
25
food_planner/migrations/0006_auto_20200223_1331.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Generated by Django 3.0.3 on 2020-02-23 12:31
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('food_planner', '0005_auto_20200223_1317'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='recipestep',
|
||||
unique_together=set(),
|
||||
),
|
||||
migrations.AlterOrderWithRespectTo(
|
||||
name='recipestep',
|
||||
order_with_respect_to='recipe',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='recipestep',
|
||||
name='number_of_step',
|
||||
),
|
||||
]
|
||||
@ -125,12 +125,11 @@ class RecipeStep(models.Model):
|
||||
recipe = models.ForeignKey(Recipe, models.CASCADE)
|
||||
image = models.ImageField(_('Image'), blank=True, null=True)
|
||||
description = models.TextField(_('Description'))
|
||||
number_of_step = models.PositiveIntegerField(_('Number of step'))
|
||||
|
||||
class Meta:
|
||||
unique_together = ['recipe', 'number_of_step']
|
||||
verbose_name = _('Recipe step')
|
||||
verbose_name_plural = _('Recipe steps')
|
||||
order_with_respect_to = 'recipe'
|
||||
|
||||
|
||||
class UsedKitchenUtility(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user