• 
      

    Fix loading admin pages with Delete links on extension admin sites.

    Review Request #12063 — Created Feb. 19, 2022 and submitted — Latest diff uploaded

    Information

    Review Board
    release-4.0.x

    Reviewers

    When rendering the change form for a model on an admin site, we were
    using Django's admin_urlname() function to generate the namespaced URL
    name to the model.

    Since this is what Django itself calls, it was expected to work
    regardless of the AdminSite hosting the page. However, in reality, it
    just hard-codes admin as the namespace, without caring about the
    actual AdminSite.

    This change removes this call entirely, switching to our own URL
    building logic that respects the AdminSite name.

    Tested loading normal database model change forms, and extension-provided
    ones.

    Tested the Delete button in each case.

    Commits

    Files