This chapter covered a variety of interesting topics. We learned about several Django frameworks that are useful when deploying Django. We also learned how to move a Django project from development to a production environment. Notably, the frameworks that we learned about are all very easy to use, so you will be able to effectively utilize them in your future projects.
Here is a quick summary of the Django features explained in this chapter:
To mark a string for translation, use the
gettext
orgettext_lazy
functions in views, models and forms, and thetrans
andblocktrans
template tags in templates.To create and compile a language file, use the
make-messages.py
andcompile-messages.py
utilities.You can change the language of the site globally by creating a configuration variable named
LANGUAGE_CODE
insettings.py
, or per user by enabling theLocaleMiddleware
class and thesetlanguage
view.The caching system allows you to speed up your website during heavy load. To enable it, choose...