From c2e70f02653519db3a49cd48f5158ccad7434d25 Mon Sep 17 00:00:00 2001 From: Flavio Curella Date: Wed, 22 Jul 2015 09:43:21 -0500 Subject: Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField --- tests/inline_formsets/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/inline_formsets/models.py') diff --git a/tests/inline_formsets/models.py b/tests/inline_formsets/models.py index f29362e321..d94069d5db 100644 --- a/tests/inline_formsets/models.py +++ b/tests/inline_formsets/models.py @@ -12,9 +12,9 @@ class Parent(models.Model): class Child(models.Model): - mother = models.ForeignKey(Parent, related_name='mothers_children') - father = models.ForeignKey(Parent, related_name='fathers_children') - school = models.ForeignKey(School) + mother = models.ForeignKey(Parent, models.CASCADE, related_name='mothers_children') + father = models.ForeignKey(Parent, models.CASCADE, related_name='fathers_children') + school = models.ForeignKey(School, models.CASCADE) name = models.CharField(max_length=100) @@ -28,7 +28,7 @@ class Poet(models.Model): @python_2_unicode_compatible class Poem(models.Model): - poet = models.ForeignKey(Poet) + poet = models.ForeignKey(Poet, models.CASCADE) name = models.CharField(max_length=100) def __str__(self): -- cgit v1.3