class ReverseOneToOneDescriptor:
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant is a ReverseOneToOneDescriptor instance.
Method | __get__ |
Get the related instance through the reverse relation. |
Method | __init__ |
Undocumented |
Method | __reduce__ |
Undocumented |
Method | __set__ |
Set the related instance through the reverse relation. |
Method | get_prefetch_queryset |
Undocumented |
Method | get_queryset |
Undocumented |
Method | is_cached |
Undocumented |
Instance Variable | related |
Undocumented |
Property | RelatedObjectDoesNotExist |
Undocumented |
Get the related instance through the reverse relation.
With the example above, when getting place.restaurant:
Keep in mind that Restaurant holds the foreign key to Place.
Set the related instance through the reverse relation.
With the example above, when setting place.restaurant = restaurant:
Keep in mind that Restaurant holds the foreign key to Place.