Add rendering improvements for Admin Change Form fieldsets.
Review Request #10888 — Created Feb. 6, 2020 and submitted — Latest diff uploaded
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.