Add rendering improvements for Admin Change Form fieldsets.
Review Request #10888 — Created Feb. 6, 2020 and submitted
This improves the admin fieldset rendering in a few important ways:
It splits out the field rendering into its own reusable template
(admin/includes/field.html
).It adds a unique row ID for each form row in the fieldset, so that
a field's rows can be referenced.It wraps template rendering into a
ChangeFormFieldset.render()
method, which can be called by a{% render_change_form_fieldset %}
template tag. This allows for the next benefit:The
admin/includes/fieldset.html
template can now be extended and
its newfields
block overridden. The template can be provided
by setting thefieldset_template_name
attribute on aModelAdmin
.These will allow pages like the repository configuration page to more
easily specialize certain fieldsets.
Unit tests passed.
Tested along with the other changes to the repository configuration
page.
Summary | ID |
---|---|
839282e653463955599f2ff4c71a8b24c20807f5 |