1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #26961 -- Fixed invalid ModelAdmins in tests.

This commit is contained in:
Adam Chainz
2016-08-05 15:20:38 +01:00
committed by Tim Graham
parent 8b734d2f99
commit cd86f03591
2 changed files with 11 additions and 8 deletions

View File

@@ -913,11 +913,16 @@ class ChildOfReferer(ParentWithFK):
# Models for #23431
class InlineReferer(models.Model):
pass
class ReferencedByInline(models.Model):
name = models.CharField(max_length=20, unique=True)
class InlineReference(models.Model):
referer = models.ForeignKey(InlineReferer, models.CASCADE)
fk = models.ForeignKey(
ReferencedByInline,
models.CASCADE,
@@ -926,10 +931,6 @@ class InlineReference(models.Model):
)
class InlineReferer(models.Model):
refs = models.ManyToManyField(InlineReference)
# Models for #23604 and #23915
class Recipe(models.Model):
rname = models.CharField(max_length=20, unique=True)