1👍
Please try pip freeze
and check that django-debug-toolbar
is installed properly. In Windows you should install pypi packages in CMD as Administrator or in virtualenv. Otherwise Windows won’t let you to install package by pip.
0👍
Also had issues installing django-debug-toolbar for Django 1.9.8:
These are the steps that helped me:
1.pip install django-debug-toolbar;
2. This is my dev.py ( delelopments settings):
"""Development settings and globals."""
from .base import *
# DEBUG CONFIGURATION
DEBUG = True
MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware', ]
INSTALLED_APPS += ['debug_toolbar', ]
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
DEBUG_TOOLBAR_CONFIG = {
'DISABLE_PANELS': [
'debug_toolbar.panels.redirects.RedirectsPanel',
],
'SHOW_TEMPLATE_CONTEXT': True,
}
3.This is my urls.py
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
if settings.DEBUG:
if 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
4.Also your templates should have enclosing body tag.
Now it should work for Django 1.9.
- In a Django Model, how can I set values for Django validators based on another field?
- Save Celery tasks to database for monitor in Django admin
- My django blogging apps facebook share buttonposts wrong images
- How to apply an upgrade python package whithout stop Django server?
Source:stackexchange.com