Add rendering improvements for Admin Change Form fieldsets.

Review Request #10888 — Created Feb. 6, 2020 and submitted

chipx86
Review Board
release-4.0.x
reviewboard

This improves the admin fieldset rendering in a few important ways:

  1. It splits out the field rendering into its own reusable template
    (admin/includes/field.html).

  2. It adds a unique row ID for each form row in the fieldset, so that
    a field's rows can be referenced.

  3. 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:

  4. The admin/includes/fieldset.html template can now be extended and
    its new fields block overridden. The template can be provided
    by setting the fieldset_template_name attribute on a ModelAdmin.

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
Add rendering improvements for Admin Change Form fieldsets.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (8d4bf50)
Loading...