summaryrefslogtreecommitdiff
path: root/tests/proxy_models
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/proxy_models
parent87d55081ea398c65b2503d22ed3907a9175ec729 (diff)
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
Diffstat (limited to 'tests/proxy_models')
-rw-r--r--tests/proxy_models/models.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/proxy_models/models.py b/tests/proxy_models/models.py
index 463fd2cd5b..145f70dac6 100644
--- a/tests/proxy_models/models.py
+++ b/tests/proxy_models/models.py
@@ -124,7 +124,7 @@ class Country(models.Model):
@python_2_unicode_compatible
class State(models.Model):
name = models.CharField(max_length=50)
- country = models.ForeignKey(Country)
+ country = models.ForeignKey(Country, models.CASCADE)
def __str__(self):
return self.name
@@ -158,7 +158,7 @@ class ProxyTrackerUser(TrackerUser):
@python_2_unicode_compatible
class Issue(models.Model):
summary = models.CharField(max_length=255)
- assignee = models.ForeignKey(ProxyTrackerUser)
+ assignee = models.ForeignKey(ProxyTrackerUser, models.CASCADE)
def __str__(self):
return ':'.join((self.__class__.__name__, self.summary,))
@@ -166,7 +166,7 @@ class Issue(models.Model):
class Bug(Issue):
version = models.CharField(max_length=50)
- reporter = models.ForeignKey(BaseUser)
+ reporter = models.ForeignKey(BaseUser, models.CASCADE)
class ProxyBug(Bug):
@@ -191,8 +191,8 @@ class Improvement(Issue):
or to a proxy of proxy model
"""
version = models.CharField(max_length=50)
- reporter = models.ForeignKey(ProxyTrackerUser)
- associated_bug = models.ForeignKey(ProxyProxyBug)
+ reporter = models.ForeignKey(ProxyTrackerUser, models.CASCADE)
+ associated_bug = models.ForeignKey(ProxyProxyBug, models.CASCADE)
class ProxyImprovement(Improvement):