class ManyToOneRel(ForeignObjectRel):
Known subclasses: django.db.models.fields.reverse_related.OneToOneRel
Used by the ForeignKey field to store information about the relation.
_meta.get_fields() returns this class to provide access to the field flags for the reverse relation.
Note: Because we somewhat abuse the Rel objects by using them as reverse fields we get the funny situation where ManyToOneRel.many_to_one == False and ManyToOneRel.one_to_many == True. This is unfortunate but the actual ManyToOneRel class is a private API and there is work underway to turn reverse relations into actual fields.
Method | __getstate__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | get_related_field |
Return the Field in the 'to' object to which this relationship is tied. |
Method | set_field_name |
Set the related field's name, this is not available until later stages of app loading, so set_field_name is called from set_attributes_from_rel() |
Instance Variable | field_name |
Undocumented |
Property | identity |
Undocumented |
Inherited from ForeignObjectRel
:
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | get_accessor_name |
Undocumented |
Method | get_cache_name |
Return the name of the cache key to use for storing an instance of the forward model on the reverse model. |
Method | get_choices |
Return choices with a default blank choices included, for use as <select> choices for this field. |
Method | get_extra_restriction |
Undocumented |
Method | get_internal_type |
Undocumented |
Method | get_joining_columns |
Undocumented |
Method | get_lookup |
Undocumented |
Method | get_path_info |
Undocumented |
Method | is_hidden |
Should the related object be hidden? |
Class Variable | auto_created |
Undocumented |
Class Variable | concrete |
Undocumented |
Class Variable | editable |
Undocumented |
Class Variable | empty_strings_allowed |
Undocumented |
Class Variable | is_relation |
Undocumented |
Class Variable | null |
Undocumented |
Instance Variable | field |
Undocumented |
Instance Variable | limit_choices_to |
Undocumented |
Instance Variable | model |
Undocumented |
Instance Variable | multiple |
Undocumented |
Instance Variable | on_delete |
Undocumented |
Instance Variable | parent_link |
Undocumented |
Instance Variable | related_name |
Undocumented |
Instance Variable | related_query_name |
Undocumented |
Instance Variable | symmetrical |
Undocumented |
Property | db_type |
Undocumented |
Property | hidden |
Undocumented |
Property | many_to_many |
Undocumented |
Property | many_to_one |
Undocumented |
Property | name |
Undocumented |
Property | one_to_many |
Undocumented |
Property | one_to_one |
Undocumented |
Property | related_model |
Undocumented |
Property | remote_field |
Undocumented |
Property | target_field |
When filtering against this relation, return the field on the remote model against which the filtering should happen. |
Inherited from FieldCacheMixin
(via ForeignObjectRel
):
Method | delete_cached_value |
Undocumented |
Method | get_cached_value |
Undocumented |
Method | is_cached |
Undocumented |
Method | set_cached_value |
Undocumented |
django.db.models.fields.reverse_related.OneToOneRel
Undocumented