Add on_delete to BlogPageTag model

This commit is contained in:
Mary Kate Fain 2018-02-07 13:34:33 -05:00 committed by Matt Westcott
parent 9cb6b33600
commit a485fb9ef1
2 changed files with 6 additions and 1 deletions

View file

@ -269,6 +269,7 @@ Contributors
* Bruno Alla
* Christopher Bledsoe (The Motley Fool)
* Florent Osmont
* Mary Kate Fain
Translators
===========

View file

@ -581,7 +581,11 @@ First, alter ``models.py`` once more:
class BlogPageTag(TaggedItemBase):
content_object = ParentalKey('BlogPage', related_name='tagged_items')
content_object = ParentalKey(
'BlogPage',
related_name='tagged_items',
on_delete=models.CASCADE
)
class BlogPage(Page):