Appendix E. Built-in Template Tags and Filters
Chapter 4 lists a number of the most useful built-in template tags and filters. However, Django ships with many more built-in tags and filters. This appendix covers them.
Built-in Tag Reference
autoescape
Controls the current autoescaping behavior. This tag takes either on
or off
as an argument, which determines whether autoescaping is in effect inside the block.
When autoescaping is in effect, all variable content has HTML escaping applied to it before placing the result into the output (but after any filters have been applied). This is equivalent to manually applying the escape
filter to each variable.
The only exceptions are variables that are already marked as "safe" from escaping, either by the code ...
Get The Definitive Guide to Django: Web Development Done Right, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.