class GenericForeignKey(FieldCacheMixin):
Provide a generic many-to-one relation through the content_type and object_id fields.
This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
Instance Variable | for_concrete_model |
Undocumented |
Method | __get__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __set__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | _check_content_type_field |
Check if field named field_name in model model exists and is a valid content_type field (is a ForeignKey to ContentType). |
Method | _check_field_name |
Undocumented |
Method | _check_object_id_field |
Undocumented |
Method | check |
Undocumented |
Method | contribute_to_class |
Undocumented |
Method | get_cache_name |
Undocumented |
Method | get_content_type |
Undocumented |
Method | get_filter_kwargs_for_object |
See corresponding method on Field |
Method | get_forward_related_filter |
See corresponding method on RelatedField |
Method | get_prefetch_queryset |
Undocumented |
Class Variable | auto_created |
Undocumented |
Class Variable | concrete |
Undocumented |
Class Variable | hidden |
Undocumented |
Class Variable | is_relation |
Undocumented |
Class Variable | many_to_many |
Undocumented |
Class Variable | many_to_one |
Undocumented |
Class Variable | one_to_many |
Undocumented |
Class Variable | one_to_one |
Undocumented |
Class Variable | related_model |
Undocumented |
Class Variable | remote_field |
Undocumented |
Instance Variable | column |
Undocumented |
Instance Variable | ct_field |
Undocumented |
Instance Variable | editable |
Undocumented |
Instance Variable | fk_field |
Undocumented |
Instance Variable | model |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | rel |
Undocumented |
Inherited from FieldCacheMixin
:
Method | delete_cached_value |
Undocumented |
Method | get_cached_value |
Undocumented |
Method | is_cached |
Undocumented |
Method | set_cached_value |
Undocumented |
Undocumented
field_name
in model model
exists and is a
valid content_type field (is a ForeignKey to ContentType).