changed ingredient field typ
This commit is contained in:
parent
cb35666f0e
commit
48d1b8d952
21
cookbook/migrations/0013_auto_20191118_1328.py
Normal file
21
cookbook/migrations/0013_auto_20191118_1328.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Generated by Django 2.2.7 on 2019-11-18 12:28
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cookbook', '0012_auto_20191118_1251'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='recipeingredients',
|
||||||
|
name='ingredient',
|
||||||
|
field=models.CharField(max_length=128),
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Ingredients',
|
||||||
|
),
|
||||||
|
]
|
@ -49,10 +49,6 @@ class Keyword(models.Model):
|
|||||||
return "{0} {1}".format(self.icon, self.name)
|
return "{0} {1}".format(self.icon, self.name)
|
||||||
|
|
||||||
|
|
||||||
class Ingredients(models.Model):
|
|
||||||
name = models.CharField(max_length=128)
|
|
||||||
|
|
||||||
|
|
||||||
class Recipe(models.Model):
|
class Recipe(models.Model):
|
||||||
name = models.CharField(max_length=128)
|
name = models.CharField(max_length=128)
|
||||||
instructions = models.TextField(blank=True)
|
instructions = models.TextField(blank=True)
|
||||||
@ -79,7 +75,7 @@ class RecipeIngredients(models.Model):
|
|||||||
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
|
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
|
||||||
unit = models.CharField(max_length=128)
|
unit = models.CharField(max_length=128)
|
||||||
amount = models.DecimalField(default=0, decimal_places=2, max_digits=16)
|
amount = models.DecimalField(default=0, decimal_places=2, max_digits=16)
|
||||||
ingredient = models.ForeignKey(Ingredients, models.PROTECT)
|
ingredient = models.CharField(max_length=128)
|
||||||
|
|
||||||
|
|
||||||
class Comment(models.Model):
|
class Comment(models.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user