mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
[1.7.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 3cbb7590cb from master
This commit is contained in:
@@ -822,3 +822,20 @@ class Worker(models.Model):
|
||||
work_at = models.ForeignKey(Restaurant)
|
||||
name = models.CharField(max_length=50)
|
||||
surname = models.CharField(max_length=50)
|
||||
|
||||
|
||||
# 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