Add a new class structure for Change Forms.

Review Request #10849 — Created Jan. 23, 2020 and submitted

Information

Review Board
release-4.0.x

Reviewers

The Django administration UI's Change Form is built around an internal
class structure representing fieldsets, field rows, and fields, all
living in django.contrib.admin.helpers. This computes information
necessary for Django's templates, and is not public API.

Since we heavily customize the administration UI, we've been at the
mercy of Django's logic and templates here. With the administration UI
rewrite, we're wanting to become less dependent on their choices, and be
in a position to more easily notice when they make changes under the
hood.

This change introduces our own class structure, which is built on top of
Django's, but makes use of our CSS component classes and provides state
our templates need. Our customizations start at the fieldset level
(requiring a new template tag to generate them from Django's
AdminForm).

Unit tests are added to ensure all the functionality we depend on works
as expected. This will help us quickly check for changes and have a
mechanism to adapt to them when we upgrade Django in the future.

Unit tests pass on Django 1.6 and 1.11.

Tested the Change Form page for all available models.

Summary ID
Add a new class structure for Change Forms.
The Django administration UI's Change Form is built around an internal class structure representing fieldsets, field rows, and fields, all living in `django.contrib.admin.helpers`. This computes information necessary for Django's templates, and is not public API. Since we heavily customize the administration UI, we've been at the mercy of Django's logic and templates here. With the administration UI rewrite, we're wanting to become less dependent on their choices, and be in a position to more easily notice when they make changes under the hood. This change introduces our own class structure, which is built on top of Django's, but makes use of our CSS component classes and provides state our templates need. Our customizations start at the fieldset level (requiring a new template tag to generate them from Django's `AdminForm`). Unit tests are added to ensure all the functionality we depend on works as expected. This will help us quickly check for changes and have a mechanism to adapt to them when we upgrade Django in the future.
63a04757fd6717f61dcce0cabee8435b98a0fd41
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (dfe55ce)