MCPcopy
hub / github.com/django/django / related_query_name

Method related_query_name

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

Define the name that can be used to identify this related object in a table-spanning query.

(self)

Source from the content-addressed store, hash-verified

512 return super().formfield(**defaults)
513
514 def related_query_name(self):
515 """
516 Define the name that can be used to identify this related object in a
517 table-spanning query.
518 """
519 return (
520 self.remote_field.related_query_name
521 or self.remote_field.related_name
522 or self.opts.model_name
523 )
524
525 @property
526 def target_field(self):

Callers 10

_check_clashesMethod · 0.95
reverse_field_pathFunction · 0.80
_check_orderingMethod · 0.80
_get_field_choicesMethod · 0.80
__init__Method · 0.80
nameMethod · 0.80

Calls

no outgoing calls