Skip to content

Commit e05f069

Browse files
authored
Merge pull request #377 from faassen/patch-1
Adjustments to make it work with Django 2.0.1
2 parents 961404f + ea4ddc7 commit e05f069

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/tutorial-plain.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ Let's get started with these models:
6868
class Ingredient(models.Model):
6969
name = models.CharField(max_length=100)
7070
notes = models.TextField()
71-
category = models.ForeignKey(Category, related_name='ingredients')
71+
category = models.ForeignKey(Category, related_name='ingredients',
72+
on_delete=models.CASCADE)
7273
7374
def __str__(self):
7475
return self.name
@@ -80,7 +81,7 @@ Add ingredients as INSTALLED_APPS:
8081
INSTALLED_APPS = [
8182
...
8283
# Install the ingredients app
83-
'ingredients',
84+
'cookbook.ingredients',
8485
]
8586
8687
Don't forget to create & run migrations:

0 commit comments

Comments
 (0)