Summary
We have now reached the end of discussing techniques for getting more information about how Django application code is running. In this chapter, we:
Developed some template utility code to track what SQL requests are made during production of a page
Learned that creating re-usable general utility code can turn into more work than it might first seem to require
Learned how the Django Debug Toolbar can be used to get the same information as in our home-grown code in addition to more information, with much less effort
Discussed the usefulness of applying a general logging framework during code development, as opposed to relying on the ad-hoc "sprinkle
print
" method of debugging problems
With the use of these tools and techniques, we are able to glean a great deal of information about the working of our code. Having a good understanding of how the code behaves when it is working properly makes it much easier to debug problems when they occur. Furthermore, checking on exactly what the code...