Import and reload all admin modules for an extension's apps.
Review Request #14798 — Created Feb. 4, 2026 and updated
When loading or reloading an extension, the main extension module's
.adminsubmodule was being imported or reloaded. If the extension had
apps with their own.admin, those would never be reloaded, even though
Django itself would initially import them. This would cause admin site
registrations to disappear on extension reload, since theAdminSite
would be thrown away and the new one would never be set up.We now properly handle an import/reload for each extension app's
.adminsubmodule.Note that if an extension was trying to import one
.adminfrom another
to work around this, they might get duplicate registration errors that
prevent the extension from loading. However, these extensions would have
had problems during reload anyway.
Unit tests passed.
Triggered frequent extension state reloading and verified an issue I hit
with Power Pack's admin registrations went away, and that the appropriate
modules were reloading.
| Summary | ID |
|---|---|
| e741f98992f491642730d60c575aea3b438a4911 |