0

enter image description here

I want to show debug tool bar but it looks like above.. what's wrong?

yuuum
  • 3
  • 2

1 Answers1

0

First, be sure you have 'django.contrib.staticfiles' in your INSTALLED_APPS (settings.py)

INSTALLED_APPS = [
    # ...
    "django.contrib.staticfiles",
    # ...
]

STATIC_URL = "static/"

Check you have "django.template.backends.django.DjangoTemplates" and "APP_DIRS": True in your template config inside settings.py

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "APP_DIRS": True,
        # ...
    }
]

Add "debug_toolbar" to your INSTALLED_APPS settings.py

INSTALLED_APPS = [
    # ...
    "debug_toolbar",
    # ...
]

Add django-debug-toolbar’s URLs to your project’s URLconf [urls.py, or any url file:)]

from django.urls import include, path

urlpatterns = [
    # ...
    path('__debug__/', include('debug_toolbar.urls')),
]

Add the Middleware (settings.py)

MIDDLEWARE = [
    # ...
    "debug_toolbar.middleware.DebugToolbarMiddleware",
    # ...
]

Configure Internal IPs add this config to settings.py

INTERNAL_IPS = [
    # ...
    "127.0.0.1",
    # ...
]

Should be working now ;)

More info https://django-debug-toolbar.readthedocs.io/en/latest/installation.html