Ensure we pass `opts` to change_form templates in siteconfig.

Review Request #12150 — Created March 14, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

The Djblets siteconfig app builds on the admin change_form.html
template, but changes to that template were made at some point which
were causing problems. Specifically, Django seems to have added the
ability to override that template on a per-app or per-model basis, but
that assumed that it was being rendered from within the admin view,
which inserted an opts into the render context which was the model's
_meta object. This change adds the siteconfig's _meta object in
appropriately so that Django's internal InclusionAdminTag doesn't
explode.

Was able to open various settings pages in the Review Board admin UI
without it exploding.

Summary ID
Ensure we pass `opts` to change_form templates in siteconfig.
The Djblets siteconfig app builds on the admin `change_form.html` template, but changes to that template were made at some point which were causing problems. Specifically, Django seems to have added the ability to override that template on a per-app or per-model basis, but that assumed that it was being rendered from within the admin view, which inserted an `opts` into the render context which was the model's `_meta` object. This change adds the siteconfig's `_meta` object in appropriately so that Django's internal `InclusionAdminTag` doesn't explode. Testing Done: Was able to open various settings pages in the Review Board admin UI without it exploding.
619c9f80e0ee70cde25c59e2eaba5299ef5fbc50
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (f230fd6)