ingredients saving

This commit is contained in:
vabene1111
2019-11-19 20:42:10 +01:00
parent ca7d0ccef4
commit e62219f031
4 changed files with 37 additions and 10 deletions

View File

@ -72,10 +72,10 @@ class Recipe(models.Model):
class RecipeIngredients(models.Model):
name = models.CharField(max_length=128)
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
unit = models.CharField(max_length=128)
amount = models.DecimalField(default=0, decimal_places=2, max_digits=16)
ingredient = models.CharField(max_length=128)
class Comment(models.Model):