MCPcopy
hub / github.com/django/django / get_path_info

Method get_path_info

django/db/models/fields/related.py:883–897  ·  view source on GitHub ↗

Get path from this field to the related model.

(self, filtered_relation=None)

Source from the content-addressed store, hash-verified

881 return None
882
883 def get_path_info(self, filtered_relation=None):
884 """Get path from this field to the related model."""
885 opts = self.remote_field.model._meta
886 from_opts = self.model._meta
887 return [
888 PathInfo(
889 from_opts=from_opts,
890 to_opts=opts,
891 target_fields=self.foreign_related_fields,
892 join_field=self,
893 m2m=False,
894 direct=True,
895 filtered_relation=filtered_relation,
896 )
897 ]
898
899 @cached_property
900 def path_infos(self):

Callers 3

path_infosMethod · 0.95
names_to_pathMethod · 0.45
_get_path_infoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected