mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
[1.7.x] Fixed #23604 -- Allowed related m2m fields to be references in the admin.
Thanks Simon Charette for review.
Backport of a24cf21722 from master
This commit is contained in:
committed by
Tim Graham
parent
e9609fb7a1
commit
f8d845910b
@@ -852,3 +852,13 @@ class InlineReference(models.Model):
|
||||
|
||||
class InlineReferer(models.Model):
|
||||
refs = models.ManyToManyField(InlineReference)
|
||||
|
||||
|
||||
# Models for #23604
|
||||
class Recipe(models.Model):
|
||||
name = models.CharField(max_length=20)
|
||||
|
||||
|
||||
class Ingredient(models.Model):
|
||||
name = models.CharField(max_length=20)
|
||||
recipes = models.ManyToManyField('Recipe', related_name='ingredients')
|
||||
|
||||
Reference in New Issue
Block a user