Render ModelAdmin fieldsets outside admin sites
Review Request #9040 — Created June 27, 2017 and submitted
The
filer_fieldsetsutility function filters a list of fieldsets
from adjango.contrib.admin.ModelAdminso callers rendering forms
can control which fieldsets (such as internal state) are rendered.This change also refactors the core fieldset rendering of
form_fieldsets.htmlinto its own template so a single fieldset can
be rendered.
Tested with /r/9013/
- Commit:
-
9b5f8145acd8cce52fc014df4261d49219fd2ae1ab1e4302017a0bb319efb7933f53aa5fd32f5227
- Diff:
-
Revision 4 (+52)
Checks run (2 succeeded)
- Description:
-
~ The
get_fieldsetsutility function returns bound form fields from a~ django.contrib.admin.ModelAdminso they can be rendered outside an~ admin site. ~ The
filer_fieldsetsutility function filters a list of fieldsets~ django.contrib.admin.ModelAdminso callers rendering forms~ can control which fieldsets (such as internal state) are rendered. + + This change also refactors the core fieldset rendering of
+ form_fieldsets.htmlinto its own template so a single fieldset can+ be rendered.
Checks run (2 succeeded)
- Description:
-
The
filer_fieldsetsutility function filters a list of fieldsets~ django.contrib.admin.ModelAdminso callers rendering forms~ from a django.contrib.admin.ModelAdminso callers rendering formscan control which fieldsets (such as internal state) are rendered. This change also refactors the core fieldset rendering of
form_fieldsets.htmlinto its own template so a single fieldset canbe rendered.