Ensure we pass `opts` to change_form templates in siteconfig.
Review Request #12150 — Created March 14, 2022 and submitted — Latest diff uploaded
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 anopts
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 internalInclusionAdminTag
doesn't
explode.
Was able to open various settings pages in the Review Board admin UI
without it exploding.