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