Make it easier to create integrations config pages outside the admin UI.

Review Request #10432 — Created Feb. 26, 2019 and submitted

Information

Djblets
release-1.0.x

Reviewers

The integrations list and configuration pages were always intended to be
usable outside of the Django admin UI, but it was never fully ready for
this. The URL definitions were still built for the admin UI, and so were
the views.

This change makes the integration pages embeddable elsewhere in a
website. A new mixin, IntegrationListContextViewMixin, provides all
the page state needed for rendering the integration configuration list,
and the base views are no longer using the admin templates by default.

Those templates themselves have moved into an integrations/admin/
directory, helping to distinguish them from more reusable templates.

build_integration_urlpatterns() has been updated to take a namespace
for the URLs, allowing for a site to include all the integrations pages
in a way where links will reference the correct places without any risk
of clashing with the admin UI.

There's also a fix for saving integration forms, where the integration
ID could end up unset or could be changed depending on the subclass of
the form. We now force the correct integration ID during saving.

Tested that the admin UI's integration list and all related config pages
still work.

Built a version of the list embedded in another page in its own URL
namespace, and verified that all links work.

Summary ID
Make it easier to create integrations config pages outside the admin UI.
The integrations list and configuration pages were always intended to be usable outside of the Django admin UI, but it was never fully ready for this. The URL definitions were still built for the admin UI, and so were the views. This change makes the integration pages embeddable elsewhere in a website. A new mixin, `IntegrationListContextViewMixin`, provides all the page state needed for rendering the integration configuration list, and the base views are no longer using the admin templates by default. Those templates themselves have moved into an `integrations/admin/` directory, helping to distinguish them from more reusable templates. `build_integration_urlpatterns()` has been updated to take a namespace for the URLs, allowing for a site to include all the integrations pages in a way where links will reference the correct places without any risk of clashing with the admin UI. There's also a fix for saving integration forms, where the integration ID could end up unset or could be changed depending on the subclass of the form. We now force the correct integration ID during saving.
eba734b29eb15335ef1e5afd1e30c4fc4e7600a8
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (e34a3a9)
Loading...