These are chat archives for django/django

17th
Feb 2018
:]
@elcolie
Feb 17 2018 04:48 UTC
Hi
My django_debug_toolbar does not work
Possible the order of MiddelWare is misconfigure
Here is base.py
MIDDLEWARE = [
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
local.py
MIDDLEWARE += [
    'debug_toolbar.middleware.DebugToolbarMiddleware',
]

https://django-debug-toolbar.readthedocs.io/en/stable/installation.html#getting-the-code
Warning says

You should include the Debug Toolbar middleware as early as possible in the list. However, it must come after any other middleware that encodes the response’s content

I put it at last already. What's wrong?
:]
@elcolie
Feb 17 2018 10:58 UTC
I found it. It is django-environ. I had submitted the issue last year :worried:
Mehmood Deshmukh
@meshde
Feb 17 2018 12:39 UTC
@elcolie So how did you solve the problem?
I started to solve it just now.