mirror of
https://github.com/django/django.git
synced 2025-08-02 01:53:15 +00:00
Fixed #23604 -- Allowed related m2m fields to be references in the admin.
Thanks Simon Charette for review.
This commit is contained in:
parent
e501d4c505
commit
a24cf21722
8 changed files with 37 additions and 5 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue