summaryrefslogtreecommitdiff
path: root/tests/model_options
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/model_options
parent87d55081ea398c65b2503d22ed3907a9175ec729 (diff)
downloaddjango-c2e70f02653519db3a49cd48f5158ccad7434d25.tar.gz
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
Diffstat (limited to 'tests/model_options')
-rw-r--r--tests/model_options/models/default_related_name.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/model_options/models/default_related_name.py b/tests/model_options/models/default_related_name.py
index 57b52647e6..d4687dc6a2 100644
--- a/tests/model_options/models/default_related_name.py
+++ b/tests/model_options/models/default_related_name.py
@@ -8,13 +8,13 @@ class Author(models.Model):
class Editor(models.Model):
name = models.CharField(max_length=128)
- bestselling_author = models.ForeignKey(Author)
+ bestselling_author = models.ForeignKey(Author, models.CASCADE)
class Book(models.Model):
title = models.CharField(max_length=128)
authors = models.ManyToManyField(Author)
- editor = models.ForeignKey(Editor, related_name="edited_books")
+ editor = models.ForeignKey(Editor, models.CASCADE, related_name="edited_books")
class Meta:
default_related_name = "books"
@@ -34,7 +34,7 @@ class BookStore(Store):
class EditorStore(Store):
- editor = models.ForeignKey(Editor)
+ editor = models.ForeignKey(Editor, models.CASCADE)
available_books = models.ManyToManyField(Book)
class Meta: