django-debug-toolbar not showing up

前端 未结 27 1680
谎友^
谎友^ 2020-11-30 20:12

I looked at other questions and can\'t figure it out...

I did the following to install django-debug-toolbar:

  1. pip install django-debug-toolbar
27条回答
  •  旧时难觅i
    2020-11-30 20:52

    I have the toolbar working just perfect. With this configurations:

    1. DEBUG = True
    2. INTERNAL_IPS = ('127.0.0.1', '192.168.0.1',)
    3. DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False,}
    4. The middleware is the first element in MIDDLEWARE_CLASSES:
    MIDDLEWARE_CLASSES = (
        'debug_toolbar.middleware.DebugToolbarMiddleware',
        'django.middleware.common.CommonMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.messages.middleware.MessageMiddleware',
    )
    

    I hope it helps

提交回复
热议问题