generated from 2martens/django-template
Fixed __str__ of Pantry
This commit is contained in:
@ -139,9 +139,8 @@ class Pantry(models.Model):
|
|||||||
ingredients = models.ManyToManyField(Ingredient, through='StoredIngredient')
|
ingredients = models.ManyToManyField(Ingredient, through='StoredIngredient')
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return format_lazy('Pantry of {firstName} {lastName}',
|
return str.format('Pantry of {username}',
|
||||||
firstName=self.owner.first_name,
|
username=self.owner.username)
|
||||||
lastName=self.owner.last_name)
|
|
||||||
|
|
||||||
|
|
||||||
class StoredIngredient(models.Model):
|
class StoredIngredient(models.Model):
|
||||||
|
|||||||
Reference in New Issue
Block a user