We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 961404f + ea4ddc7 commit e05f069Copy full SHA for e05f069
docs/tutorial-plain.rst
@@ -68,7 +68,8 @@ Let's get started with these models:
68
class Ingredient(models.Model):
69
name = models.CharField(max_length=100)
70
notes = models.TextField()
71
- category = models.ForeignKey(Category, related_name='ingredients')
+ category = models.ForeignKey(Category, related_name='ingredients',
72
+ on_delete=models.CASCADE)
73
74
def __str__(self):
75
return self.name
@@ -80,7 +81,7 @@ Add ingredients as INSTALLED_APPS:
80
81
INSTALLED_APPS = [
82
...
83
# Install the ingredients app
- 'ingredients',
84
+ 'cookbook.ingredients',
85
]
86
87
Don't forget to create & run migrations:
0 commit comments