1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.6.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:
Emmanuelle Delescolle
2014-10-05 20:06:51 +02:00
committed by Tim Graham
parent 0aad1f1ea9
commit c5c4bfa12a
7 changed files with 33 additions and 5 deletions

View File

@@ -716,3 +716,12 @@ 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')