class documentation

class ForeignObjectRel(FieldCacheMixin):

Known subclasses: django.db.models.fields.reverse_related.ManyToManyRel, django.db.models.fields.reverse_related.ManyToOneRel

View In Hierarchy

Used by ForeignObject to store information about the relation.

_meta.get_fields() returns this class to provide access to the field flags for the reverse relation.

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ 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?
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()
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 field​_name 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 identity 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:

Method delete​_cached​_value Undocumented
Method get​_cached​_value Undocumented
Method is​_cached Undocumented
Method set​_cached​_value Undocumented
def __eq__(self, other):

Undocumented

def __hash__(self):

Undocumented

def __init__(self, field, to, related_name=None, related_query_name=None, limit_choices_to=None, parent_link=False, on_delete=None):
def __repr__(self):

Undocumented

def get_accessor_name(self, model=None):

Undocumented

def get_cache_name(self):
Return the name of the cache key to use for storing an instance of the forward model on the reverse model.
def get_choices(self, include_blank=True, blank_choice=BLANK_CHOICE_DASH, limit_choices_to=None, ordering=()):

Return choices with a default blank choices included, for use as <select> choices for this field.

Analog of django.db.models.fields.Field.get_choices(), provided initially for utilization by RelatedFieldListFilter.

def get_extra_restriction(self, alias, related_alias):

Undocumented

def get_internal_type(self):

Undocumented

def get_joining_columns(self):

Undocumented

def get_lookup(self, lookup_name):

Undocumented

def get_path_info(self, filtered_relation=None):

Undocumented

def is_hidden(self):
Should the related object be hidden?
def set_field_name(self):
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()
auto_created: bool =

Undocumented

concrete: bool =

Undocumented

editable: bool =

Undocumented

empty_strings_allowed: bool =

Undocumented

is_relation: bool =

Undocumented

null: bool =

Undocumented

field =

Undocumented

field_name =
limit_choices_to =

Undocumented

model =

Undocumented

multiple: bool =
on_delete =

Undocumented

parent_link =

Undocumented

related_name =

Undocumented

related_query_name =

Undocumented

symmetrical: bool =
@property
db_type =

Undocumented

@cached_property
hidden =

Undocumented

@cached_property
many_to_many =

Undocumented

@cached_property
many_to_one =

Undocumented

@cached_property
name =

Undocumented

@cached_property
one_to_many =

Undocumented

@cached_property
one_to_one =

Undocumented

@cached_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.