Fix debug toolbar middleware position
This commit is contained in:
parent
590970d352
commit
dbdff7655b
1 changed files with 2 additions and 1 deletions
|
@ -118,7 +118,8 @@ MIDDLEWARE = [
|
||||||
"csp.middleware.CSPMiddleware",
|
"csp.middleware.CSPMiddleware",
|
||||||
]
|
]
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
MIDDLEWARE.insert(0, "debug_toolbar.middleware.DebugToolbarMiddleware")
|
index = MIDDLEWARE.index("django.middleware.gzip.GZipMiddleware") + 1
|
||||||
|
MIDDLEWARE.insert(index, "debug_toolbar.middleware.DebugToolbarMiddleware")
|
||||||
|
|
||||||
ROOT_URLCONF = "blog.urls"
|
ROOT_URLCONF = "blog.urls"
|
||||||
|
|
||||||
|
|
Reference in a new issue