class Options:
Undocumented
Method | get_field |
Return a field instance given the name of a forward or reverse field. |
Method | get_fields |
Return a list of fields associated to the model. By default, include forward and reverse fields, fields derived from inheritance, but not hidden fields. The returned fields can be changed using the parameters: |
Constant | FORWARD_PROPERTIES |
Undocumented |
Constant | REVERSE_PROPERTIES |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | _expire_cache |
Undocumented |
Method | _format_names_with_class |
App label/class name interpolation for object names. |
Method | _get_default_pk_class |
Undocumented |
Method | _get_fields |
No summary |
Method | _populate_directed_relation_graph |
No summary |
Method | _prepare |
Undocumented |
Method | add_field |
Undocumented |
Method | add_manager |
Undocumented |
Method | can_migrate |
Return True if the model can/should be migrated on the connection . connection can be either a real connection or a connection alias. |
Method | contribute_to_class |
Undocumented |
Method | get_ancestor_link |
No summary |
Method | get_base_chain |
Return a list of parent classes leading to model (ordered from closest to most distant ancestor). This has to handle the case where model is a grandparent or even more distant relation. |
Method | get_parent_list |
Return all the ancestors of this model as a list ordered by MRO. Useful for determining if something is an ancestor, regardless of lineage. |
Method | get_path_from_parent |
Return a list of PathInfos containing the path from the parent model to the current model, or an empty list if parent is not a parent of the current model. |
Method | get_path_to_parent |
Return a list of PathInfos containing the path from the current model to the parent model, or an empty list if parent is not a parent of the current model. |
Method | setup_pk |
Undocumented |
Method | setup_proxy |
Do the internal setup so that the current model is a proxy for "target". |
Instance Variable | _get_fields_cache |
Undocumented |
Instance Variable | _ordering_clash |
Undocumented |
Instance Variable | abstract |
Undocumented |
Instance Variable | app_label |
Undocumented |
Instance Variable | apps |
Undocumented |
Instance Variable | auto_created |
Undocumented |
Instance Variable | auto_field |
Undocumented |
Instance Variable | base_manager_name |
Undocumented |
Instance Variable | concrete_model |
Undocumented |
Instance Variable | constraints |
Undocumented |
Instance Variable | db_table |
Undocumented |
Instance Variable | db_tablespace |
Undocumented |
Instance Variable | default_manager_name |
Undocumented |
Instance Variable | default_permissions |
Undocumented |
Instance Variable | default_related_name |
Undocumented |
Instance Variable | get_latest_by |
Undocumented |
Instance Variable | index_together |
Undocumented |
Instance Variable | indexes |
Undocumented |
Instance Variable | local_fields |
Undocumented |
Instance Variable | local_managers |
Undocumented |
Instance Variable | local_many_to_many |
Undocumented |
Instance Variable | managed |
Undocumented |
Instance Variable | meta |
Undocumented |
Instance Variable | model |
Undocumented |
Instance Variable | model_name |
Undocumented |
Instance Variable | object_name |
Undocumented |
Instance Variable | order_with_respect_to |
Undocumented |
Instance Variable | ordering |
Undocumented |
Instance Variable | original_attrs |
Undocumented |
Instance Variable | parents |
Undocumented |
Instance Variable | permissions |
Undocumented |
Instance Variable | pk |
Undocumented |
Instance Variable | private_fields |
Undocumented |
Instance Variable | proxy |
Undocumented |
Instance Variable | proxy_for_model |
Undocumented |
Instance Variable | related_fkey_lookups |
Undocumented |
Instance Variable | required_db_features |
Undocumented |
Instance Variable | required_db_vendor |
Undocumented |
Instance Variable | select_on_save |
Undocumented |
Instance Variable | swappable |
Undocumented |
Instance Variable | unique_together |
Undocumented |
Instance Variable | verbose_name |
Undocumented |
Instance Variable | verbose_name_plural |
Undocumented |
Property | _forward_fields_map |
Undocumented |
Property | _property_names |
Return a set of the names of the properties defined on the model. |
Property | _relation_tree |
Undocumented |
Property | app_config |
Undocumented |
Property | base_manager |
Undocumented |
Property | concrete_fields |
Return a list of all concrete fields on the model and its parents. |
Property | db_returning_fields |
Private API intended only to be used by Django itself. Fields to be returned after a database insert. |
Property | default_manager |
Undocumented |
Property | fields |
Return a list of all forward fields on the model and its parents, excluding ManyToManyFields. |
Property | fields_map |
Undocumented |
Property | installed |
Undocumented |
Property | label |
Undocumented |
Property | label_lower |
Undocumented |
Property | local_concrete_fields |
Return a list of all concrete fields on the model. |
Property | managers |
Undocumented |
Property | managers_map |
Undocumented |
Property | many_to_many |
Return a list of all many to many fields on the model and its parents. |
Property | related_objects |
Return all related objects pointing to the current model. The related objects can come from a one-to-one, one-to-many, or many-to-many field relation type. |
Property | swapped |
Has this model been swapped out for another? If so, return the model name of the replacement; otherwise, return None. |
Property | total_unique_constraints |
Return a list of total unique constraints. Useful for determining set of fields guaranteed to be unique for all rows. |
Property | verbose_name_raw |
Return the untranslated verbose name. |
Return a list of fields associated to the model. By default, include forward and reverse fields, fields derived from inheritance, but not hidden fields. The returned fields can be changed using the parameters:
set[ str]
=
Undocumented
Value |
|
set[ str]
=
Undocumented
Value |
|
Internal helper function to return fields of the model. * If forward=True, then fields defined on this model are returned. * If reverse=True, then relations pointing to this model are returned. * If include_hidden=True, then fields with is_hidden=True are returned. * The include_parents argument toggles if fields from parent models
should be included. It has three values: True, False, and PROXY_PARENTS. When set to PROXY_PARENTS, the call will return all fields defined for the current model or any of its parents in the parent chain to the model's concrete model.
connection
.
connection
can be either a real connection or a connection alias.Return the field on the current model which points to the given "ancestor". This is possible an indirect link (a pointer to a parent model, which points, eventually, to the ancestor). Used when constructing table joins for model inheritance.
Return None if the model isn't an ancestor of this one.
Return a list of all concrete fields on the model and its parents.
Private API intended only to be used by Django itself; get_fields() combined with filtering of field properties is the public API for obtaining this field list.
Return a list of all forward fields on the model and its parents, excluding ManyToManyFields.
Private API intended only to be used by Django itself; get_fields() combined with filtering of field properties is the public API for obtaining this field list.
Return a list of all concrete fields on the model.
Private API intended only to be used by Django itself; get_fields() combined with filtering of field properties is the public API for obtaining this field list.
Return a list of all many to many fields on the model and its parents.
Private API intended only to be used by Django itself; get_fields() combined with filtering of field properties is the public API for obtaining this list.
Return all related objects pointing to the current model. The related objects can come from a one-to-one, one-to-many, or many-to-many field relation type.
Private API intended only to be used by Django itself; get_fields() combined with filtering of field properties is the public API for obtaining this field list.
Has this model been swapped out for another? If so, return the model name of the replacement; otherwise, return None.
For historical reasons, model name lookups using get_model() are case insensitive, so we make sure we are case insensitive here.