Browse Source

Fix ingredient model (#1258)

Add the required positional argument: 'on_delete'
pull/1105/merge
Chouaib Lammas 8 months ago committed by GitHub
parent
commit
ef9d67302e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/tutorial-relay.rst

2
docs/tutorial-relay.rst

@ -70,7 +70,7 @@ Let's get started with these models:
class Ingredient(models.Model):
name = models.CharField(max_length=100)
notes = models.TextField()
category = models.ForeignKey(Category, related_name='ingredients')
category = models.ForeignKey(Category, related_name='ingredients', on_delete=models.CASCADE)
def __str__(self):
return self.name

Loading…
Cancel
Save