1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField

This commit is contained in:
Flavio Curella
2015-07-22 09:43:21 -05:00
committed by Tim Graham
parent 87d55081ea
commit c2e70f0265
176 changed files with 1525 additions and 1008 deletions

View File

@@ -187,7 +187,7 @@ class ForeignKeyTests(test.TestCase):
def test_warning_when_unique_true_on_fk(self):
class FKUniqueTrue(models.Model):
fk_field = models.ForeignKey(Foo, unique=True)
fk_field = models.ForeignKey(Foo, models.CASCADE, unique=True)
model = FKUniqueTrue()
expected_warnings = [
@@ -213,7 +213,7 @@ class ForeignKeyTests(test.TestCase):
pending_ops_before = list(apps._pending_operations.items())
class AbstractForeignKeyModel(models.Model):
fk = models.ForeignKey('missing.FK')
fk = models.ForeignKey('missing.FK', models.CASCADE)
class Meta:
abstract = True
@@ -235,7 +235,7 @@ class ManyToManyFieldTests(test.SimpleTestCase):
pending_ops_before = list(apps._pending_operations.items())
class AbstractManyToManyModel(models.Model):
fk = models.ForeignKey('missing.FK')
fk = models.ForeignKey('missing.FK', models.CASCADE)
class Meta:
abstract = True