The Django Debug Toolbar
The Django Debug Toolbar is an app that displays debug information about a web page right in your browser. It includes information about what SQL commands were run to generate the page, the request and response headers, how long the page took to render, and more. These can be useful in the following situations:
- A page is taking a long time to load – maybe it is running too many database queries. You can see whether the same queries are being run multiple times, in which case you could consider caching. Otherwise, some queries can be sped up by adding an index to the database.
- You want to determine why a page is returning the wrong information. Your browser may have sent headers you did not expect, or maybe some headers from Django are incorrect.
- Your page is slow because it is spending time on non-database code – you can profile the page to see what functions are taking the longest.
- The page looks incorrect. You can see what...