Make sure that ‘django.contrib.staticfiles’ is set up properly and add ‘debug_toolbar’ to your INSTALLED_APPS setting:
STATIC_URL = ‘/static/’ If you’re upgrading from a previous version, you should review the change log and look for specific upgrade instructions.
Add the Debug Toolbar’s URLs to your project’s URLconf as follows:
This example uses the debug prefix, but you can use any prefix that doesn’t clash with your application’s URLs. Note the lack of quotes around debug_toolbar.urls.
The Debug Toolbar is mostly implemented in a middleware. Enable it in your settings module as follows:
The order of MIDDLEWARE and MIDDLEWARE_CLASSES is important. 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, such as GZipMiddleware. Internal IPs The Debug Toolbar is shown only if your IP is listed in the INTERNAL_IPS setting. (You can change this logic with the SHOW_TOOLBAR_CALLBACK option.) For local development, you should add ‘127.0.0.1’ to INTERNAL_IPS.