class documentation
class ForwardOneToOneDescriptor(ForwardManyToOneDescriptor): (source)
Accessor to the related object on the forward side of a one-to-one relation. In the example:: class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant') ``Restaurant.place`` is a ``ForwardOneToOneDescriptor`` instance.
Method | __set__ |
Set the related instance through the forward relation. |
Method | get |
Undocumented |
Inherited from ForwardManyToOneDescriptor
:
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 | get |
Undocumented |
Method | get |
Undocumented |
Method | is |
Undocumented |
Instance Variable | field |
Undocumented |
Property |
|
Undocumented |
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