MCPcopy
hub / github.com/django/django / _get_field_choices

Method _get_field_choices

django/db/models/sql/compiler.py:1191–1200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1189 """
1190
1191 def _get_field_choices():
1192 direct_choices = (f.name for f in opts.fields if f.is_relation)
1193 reverse_choices = (
1194 f.field.related_query_name()
1195 for f in opts.related_objects
1196 if f.field.unique
1197 )
1198 return chain(
1199 direct_choices, reverse_choices, self.query._filtered_relations
1200 )
1201
1202 related_klass_infos = []
1203 if not restricted and cur_depth > self.query.max_depth:

Callers

nothing calls this directly

Calls 4

related_query_nameMethod · 0.80
extendMethod · 0.80
joinMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected