Renamed UsedIngredients to UsedIngredient

This commit is contained in:
2020-02-19 13:09:25 +01:00
parent 0d1141a0a3
commit 0b3b344669
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ class Recipe(models.Model):
author = models.ForeignKey(User, models.SET_NULL, null=True)
kitchen_utilities = models.ManyToManyField(KitchenUtility,
through='UsedKitchenUtilities')
ingredients = models.ManyToManyField(Ingredient, through='UsedIngredients')
ingredients = models.ManyToManyField(Ingredient, through='UsedIngredient')
name = models.CharField(_('Name'), max_length=255)
image = models.ImageField(_('Image'), blank=True, null=True)
@ -104,7 +104,7 @@ class UsedKitchenUtilities(models.Model):
default=1)
class UsedIngredients(models.Model):
class UsedIngredient(models.Model):
recipe = models.ForeignKey(Recipe, models.CASCADE)
ingredient = models.ForeignKey(Ingredient, models.CASCADE)
amount = models.PositiveIntegerField(_('Amount'),