In this chapter, we will cover the following recipes:
- Using the Django shell
- Using database query expressions
- Monkey-patching the slugify() function for better internationalization support
- Toggling the Debug Toolbar
- Using ThreadLocalMiddleware
- Caching the method return value
- Using Memcached to cache Django views
- Using signals to notify administrators about new entries
- Checking for missing settings
In this chapter, we will go through several other important bits and pieces that will help you understand and utilize Django even better. You will get an overview of how to use the Django shell to experiment with the code before writing it in the files. You will be introduced to monkey patching, also known as guerrilla patching, which is a powerful feature of dynamical languages such as Python and Ruby. You will learn how to debug your code and check its performance. You will see how to access the currently logged in user and other request parameters...