mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #23604 -- Allowed related m2m fields to be references in the admin.
Thanks Simon Charette for review.
This commit is contained in:
committed by
Tim Graham
parent
e501d4c505
commit
a24cf21722
@@ -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