class documentation

class ReverseManyToOneDescriptor:

Known subclasses: django.db.models.fields.related_descriptors.ManyToManyDescriptor

View In Hierarchy

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

Method __get__ Get the related objects through the reverse relation.
Method __init__ Undocumented
Method __set__ Undocumented
Method ​_get​_set​_deprecation​_msg​_params Undocumented
Instance Variable field Undocumented
Instance Variable rel Undocumented
Property related​_manager​_cls Undocumented
def __get__(self, instance, cls=None):

Get the related objects through the reverse relation.

With the example above, when getting parent.children:

  • self is the descriptor managing the children attribute
  • instance is the parent instance
  • cls is the Parent class (unused)
def __init__(self, rel):
def __set__(self, instance, value):

Undocumented

def _get_set_deprecation_msg_params(self):
field =

Undocumented

rel =

Undocumented