Django Models Internals Docs
latest
  • abstract
  • abstract_managers
  • add_field
  • add_virtual_field
  • admin
  • app_label
  • auto_created
  • auto_field
  • concrete_managers
  • contribute_to_class
  • db_table
  • db_tablespace
  • duplicate_targets
  • fields
  • get_add_permission
  • get_all_field_names
  • get_all_related_m2m_objects_with_model
  • get_all_related_many_to_many_objects
  • get_all_related_objects
  • get_all_related_objects_with_model
  • get_ancestor_link
  • get_base_chain
  • get_change_permission
  • get_delete_permission
  • get_field
  • get_field_by_name
  • get_fields_with_model
  • get_latest_by
  • get_m2m_with_model
  • get_ordered_objects
  • get_parent_list
  • has_auto_field
  • init_name_map
  • installed
  • local_fields
  • local_many_to_many
  • managed
  • many_to_many
  • module_name
  • object_name
  • order_with_respect_to
  • ordering
  • parents
  • permissions
  • pk
  • pk_index
  • proxy
  • proxy_for_model
  • setup_pk
  • setup_proxy
  • unique_together
  • verbose_name
  • verbose_name_plural
  • verbose_name_raw
  • virtual_fields
Django Models Internals Docs
  • Docs »
  • get_ancestor_link
  • Edit on GitHub

get_ancestor_linkΒΆ

Returns 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. Returns None if the model isn’t an ancestor of this one.
Next Previous

© Copyright 2010, Brian Luft. Revision 2669ed0e.

Built with Sphinx using a theme provided by Read the Docs.