summaryrefslogtreecommitdiff
path: root/tests/admin_docs
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/admin_docs
parent87d55081ea398c65b2503d22ed3907a9175ec729 (diff)
downloaddjango-c2e70f02653519db3a49cd48f5158ccad7434d25.tar.gz
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
Diffstat (limited to 'tests/admin_docs')
-rw-r--r--tests/admin_docs/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/admin_docs/models.py b/tests/admin_docs/models.py
index 89a9e8c98e..6dff4358c2 100644
--- a/tests/admin_docs/models.py
+++ b/tests/admin_docs/models.py
@@ -38,8 +38,8 @@ class Person(models.Model):
"""
first_name = models.CharField(max_length=200, help_text="The person's first name")
last_name = models.CharField(max_length=200, help_text="The person's last name")
- company = models.ForeignKey(Company, help_text="place of work")
- family = models.ForeignKey(Family, related_name='+', null=True)
+ company = models.ForeignKey(Company, models.CASCADE, help_text="place of work")
+ family = models.ForeignKey(Family, models.SET_NULL, related_name='+', null=True)
groups = models.ManyToManyField(Group, help_text="has membership")
def _get_full_name(self):