diff options
| author | Flavio Curella <flavio.curella@gmail.com> | 2015-07-22 09:43:21 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-07-27 18:28:13 -0400 |
| commit | c2e70f02653519db3a49cd48f5158ccad7434d25 (patch) | |
| tree | c0f421a6b0c26a7716c380b3e360fecc74d553fb /tests/update/models.py | |
| parent | 87d55081ea398c65b2503d22ed3907a9175ec729 (diff) | |
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
Diffstat (limited to 'tests/update/models.py')
| -rw-r--r-- | tests/update/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/update/models.py b/tests/update/models.py index e0b391d0cd..648a773318 100644 --- a/tests/update/models.py +++ b/tests/update/models.py @@ -21,7 +21,7 @@ class DataPoint(models.Model): @python_2_unicode_compatible class RelatedPoint(models.Model): name = models.CharField(max_length=20) - data = models.ForeignKey(DataPoint) + data = models.ForeignKey(DataPoint, models.CASCADE) def __str__(self): return six.text_type(self.name) @@ -32,7 +32,7 @@ class A(models.Model): class B(models.Model): - a = models.ForeignKey(A) + a = models.ForeignKey(A, models.CASCADE) y = models.IntegerField(default=10) @@ -41,7 +41,7 @@ class C(models.Model): class D(C): - a = models.ForeignKey(A) + a = models.ForeignKey(A, models.CASCADE) class Foo(models.Model): @@ -49,4 +49,4 @@ class Foo(models.Model): class Bar(models.Model): - foo = models.ForeignKey(Foo, to_field='target') + foo = models.ForeignKey(Foo, models.CASCADE, to_field='target') |
