summaryrefslogtreecommitdiff
path: root/tests/string_lookup
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/string_lookup
parent87d55081ea398c65b2503d22ed3907a9175ec729 (diff)
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
Diffstat (limited to 'tests/string_lookup')
-rw-r--r--tests/string_lookup/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/string_lookup/models.py b/tests/string_lookup/models.py
index 5761d80d49..775ec2faf0 100644
--- a/tests/string_lookup/models.py
+++ b/tests/string_lookup/models.py
@@ -17,9 +17,9 @@ class Foo(models.Model):
@python_2_unicode_compatible
class Bar(models.Model):
name = models.CharField(max_length=50)
- normal = models.ForeignKey(Foo, related_name='normal_foo')
- fwd = models.ForeignKey("Whiz")
- back = models.ForeignKey("Foo")
+ normal = models.ForeignKey(Foo, models.CASCADE, related_name='normal_foo')
+ fwd = models.ForeignKey("Whiz", models.CASCADE)
+ back = models.ForeignKey("Foo", models.CASCADE)
def __str__(self):
return "Bar %s" % self.place.name
@@ -35,7 +35,7 @@ class Whiz(models.Model):
@python_2_unicode_compatible
class Child(models.Model):
- parent = models.OneToOneField('Base')
+ parent = models.OneToOneField('Base', models.CASCADE)
name = models.CharField(max_length=50)
def __str__(self):