1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

Fixed #23329 -- Allowed inherited and m2m fields to be referenced in the admin.

Thanks to Trac alias Markush2010 and ross for the detailed reports.

Backport of 3cbb759 from master
This commit is contained in:
Simon Charette
2014-08-21 11:55:23 -04:00
parent 5d647e5f17
commit 4c96bd8fb3
7 changed files with 65 additions and 5 deletions

View File

@@ -678,3 +678,21 @@ class Simple(models.Model):
class Choice(models.Model):
choice = models.IntegerField(blank=True, null=True,
choices=((1, 'Yes'), (0, 'No'), (None, 'No opinion')))
# Models for #23329
class ReferencedByParent(models.Model):
pass
class ParentWithFK(models.Model):
fk = models.ForeignKey(ReferencedByParent)
class ChildOfReferer(ParentWithFK):
pass
class M2MReference(models.Model):
ref = models.ManyToManyField('self')