You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autoload() inserts the debug toolbar middleware (DebugToolbarMiddleware, or DebugPanelMiddleware with DEBUG_PANEL) at the start of MIDDLEWARE, or right after GZipMiddleware when present, instead of appending it. Appended, it sat behind Django's page cache (UpdateCacheMiddleware ... FetchFromCacheMiddleware): responses without cookies were cached with the toolbar output (djdt-request-id, Server-Timing with SQL timings, or the full toolbar HTML) and served to every client, and cache hits bypassed the toolbar. A toolbar middleware already present in MIDDLEWARE keeps its position. Other extra middlewares are still appended. - show_toolbar fails closed, and system check codenerix.E001 reports it, when a toolbar middleware comes after a page cache middleware in MIDDLEWARE, with or without DEBUG_TOOLBAR_ALLOWED_IPS. This covers settings that add the page cache after calling autoload(), and Django's recommended UpdateCacheMiddleware before GZipMiddleware order, where the toolbar cannot sit both after GZip and before the cache.