Ulryx
January 25, 2023, 1:11pm
#1
Having some issues with DJDT not showing on my project. I’ve followed the instructions both in video and from DJDT. If I view source, it’s loaded in but just not showing.
I was able to get it to show in a different browser yesterday, but on re-starting project it’s not showing in any now.
Settings.py:
INSTALLED_APPS = [
‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
‘playground’,
‘debug_toolbar’,
]
MIDDLEWARE = [
‘debug_toolbar.middleware.DebugToolbarMiddleware’,
INTERNAL_IPS = [
“127.0.0.1”,
]
urls.py:
path('__debug__/', include('debug_toolbar.urls')),
Any help would be greatly appreciated, I’m at wit’s end.
Looking over the installation docs, in step 2. Check for Prerequisites, did you set:
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"APP_DIRS": True,
# ...
}
]
The TEMPLATES in your settings.py file should look like this:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
Source:
https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#check-for-prerequisites