class documentation

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation. In the example:: class Child(Model): parent = ForeignKey(Parent, related_name='children') ``Child.parent`` is a ``ForwardManyToOneDescriptor`` instance.

Method __get__ Get the related instance through the forward relation.
Method __init__ Undocumented
Method __reduce__ Pickling should return the instance attached by self.field on the model, not a new copy of that descriptor. Use getattr() to retrieve the instance directly from the model.
Method __set__ Set the related instance through the forward relation.
Method get_object Undocumented
Method get_prefetch_queryset Undocumented
Method get_queryset Undocumented
Method is_cached Undocumented
Instance Variable field Undocumented
Property RelatedObjectDoesNotExist Undocumented
def __get__(self, instance, cls=None): (source)

Get the related instance through the forward relation. With the example above, when getting ``child.parent``: - ``self`` is the descriptor managing the ``parent`` attribute - ``instance`` is the ``child`` instance - ``cls`` is the ``Child`` class (we don't need it)

def __init__(self, field_with_rel): (source)

Undocumented

def __reduce__(self): (source)

Pickling should return the instance attached by self.field on the model, not a new copy of that descriptor. Use getattr() to retrieve the instance directly from the model.

def __set__(self, instance, value): (source)

Set the related instance through the forward relation. With the example above, when setting ``child.parent = parent``: - ``self`` is the descriptor managing the ``parent`` attribute - ``instance`` is the ``child`` instance - ``value`` is the ``parent`` instance on the right of the equal sign

def get_object(self, instance): (source)
def get_prefetch_queryset(self, instances, queryset=None): (source)

Undocumented

def get_queryset(self, **hints): (source)

Undocumented

def is_cached(self, instance): (source)

Undocumented

Undocumented

@cached_property
RelatedObjectDoesNotExist = (source)

Undocumented