mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Fixed #11795 -- Document (and slightly simplify) the use of inlines for m2m relations.
This is the first immediate benefit of m2m relations having an autogenerated model. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -586,6 +586,9 @@ class ReverseManyRelatedObjectsDescriptor(object):
|
||||
# ReverseManyRelatedObjectsDescriptor instance.
|
||||
def __init__(self, m2m_field):
|
||||
self.field = m2m_field
|
||||
# through is provided so that you have easy access to the through
|
||||
# model (Book.authors.through) for inlines, etc.
|
||||
self.through = m2m_field.rel.through
|
||||
|
||||
def __get__(self, instance, instance_type=None):
|
||||
if instance is None:
|
||||
|
||||
Reference in New Issue
Block a user