While developing with Django, you may want to inspect request headers and parameters, check the current template context, or measure the performance of SQL queries. All of this and more is possible with the Django Debug Toolbar. It is a configurable set of panels that displays various debug information about the current request and response. In this recipe, we will guide you through how to toggle the visibility of the Debug Toolbar, depending on a cookie, whose value can be set by a bookmarklet. A bookmarklet is a bookmark containing a small piece of JavaScript code that you can run on any page in a browser.
Toggling the Debug Toolbar
Getting ready
To get started with toggling the visibility of the Debug Toolbar, take a look...