1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.6.x] 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 4db64e8491
commit e3453b61c6
8 changed files with 78 additions and 5 deletions

View File

@@ -687,3 +687,20 @@ 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')