MCPcopy
hub / github.com/django/django / flatten_fieldsets

Function flatten_fieldsets

django/contrib/admin/utils.py:119–124  ·  view source on GitHub ↗

Return a list of field names from an admin fieldsets structure.

(fieldsets)

Source from the content-addressed store, hash-verified

117
118
119def flatten_fieldsets(fieldsets):
120 """Return a list of field names from an admin fieldsets structure."""
121 field_names = []
122 for name, opts in fieldsets:
123 field_names.extend(flatten(opts["fields"]))
124 return field_names
125
126
127def get_deleted_objects(objs, request, admin_site):

Callers 7

get_formMethod · 0.90
_changeform_viewMethod · 0.90
get_formsetMethod · 0.90
__iter__Method · 0.90
fieldsMethod · 0.90
get_formsetMethod · 0.85

Calls 2

flattenFunction · 0.85
extendMethod · 0.80

Tested by 1