March 2020
Intermediate to advanced
608 pages
17h 17m
English
Django has an extensive template system with features such as template inheritance, filters to change the representation of values, and tags for presentational logic. Moreover, Django allows you to add your own template filters and tags to your apps. Custom filters or tags should be located in a template-tag library file under the templatetags Python package in your app. Your template-tag library can then be loaded in any template with the {% load %} template tag. In this chapter, we will create several useful filters and tags that will give more control to template editors.