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:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user