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 display various debugging 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 with 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, go through...