1
0
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:
Emmanuelle Delescolle
2014-10-05 20:06:51 +02:00
committed by Tim Graham
parent e501d4c505
commit a24cf21722
8 changed files with 37 additions and 5 deletions

View File

@@ -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')