August 2016
Beginner to intermediate
717 pages
15h 24m
English
When a developer develops templates, he/she regularly needs to use the template language and filters.
The following are the key elements of the template language:
{% autoescape on OR off %} {% endautoescape %}: This automatically starts the auto-escape feature that helps protect the browser of the displayed data (XSS).{% block block_name %} {% endblock %}: This sets the blocks that can be filled by templates that inherit from them.{% comment %} {% endcomment %}: This sets a comment that will not be sent to the user as HTML.{% extends template_name %}: This overrides a template.{% spaceless %}: This removes all the whitespaces between the HTML tags.{% include template_name %}: This includes a template named template_name ...Read now
Unlock full access