MCPcopy
hub / github.com/django/django / get_field_names_from_opts

Function get_field_names_from_opts

django/db/models/sql/query.py:71–78  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

69
70
71def get_field_names_from_opts(opts):
72 if opts is None:
73 return set()
74 return set(
75 chain.from_iterable(
76 (f.name, f.attname) if f.concrete else (f.name,) for f in opts.get_fields()
77 )
78 )
79
80
81def get_paths_from_expression(expr):

Callers 5

names_to_pathMethod · 0.85
add_fieldsMethod · 0.85

Calls 1

get_fieldsMethod · 0.45