summaryrefslogtreecommitdiff
path: root/tests/inline_formsets
diff options
context:
space:
mode:
authorFlavio Curella <flavio.curella@gmail.com>2015-07-22 09:43:21 -0500
committerTim Graham <timograham@gmail.com>2015-07-27 18:28:13 -0400
commitc2e70f02653519db3a49cd48f5158ccad7434d25 (patch)
treec0f421a6b0c26a7716c380b3e360fecc74d553fb /tests/inline_formsets
parent87d55081ea398c65b2503d22ed3907a9175ec729 (diff)
downloaddjango-c2e70f02653519db3a49cd48f5158ccad7434d25.tar.gz
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
Diffstat (limited to 'tests/inline_formsets')
-rw-r--r--tests/inline_formsets/models.py8
1 files changed, 4 insertions, 4 deletions
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):