Simplified AdminFieldExtractionMixin.get_admin_form_fields().
This commit is contained in:
parent
8c3e0eb1c1
commit
747db4018b
|
@ -68,17 +68,10 @@ class AdminFieldExtractionMixin:
|
||||||
"""
|
"""
|
||||||
Return a list of AdminFields for the AdminForm in the response.
|
Return a list of AdminFields for the AdminForm in the response.
|
||||||
"""
|
"""
|
||||||
admin_form = response.context['adminform']
|
|
||||||
fieldsets = list(admin_form)
|
|
||||||
|
|
||||||
field_lines = []
|
|
||||||
for fieldset in fieldsets:
|
|
||||||
field_lines += list(fieldset)
|
|
||||||
|
|
||||||
fields = []
|
fields = []
|
||||||
for field_line in field_lines:
|
for fieldset in response.context['adminform']:
|
||||||
fields += list(field_line)
|
for field_line in fieldset:
|
||||||
|
fields.extend(field_line)
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
def get_admin_readonly_fields(self, response):
|
def get_admin_readonly_fields(self, response):
|
||||||
|
|
Loading…
Reference in New Issue