Описание тега django-templates
A Django template is a string of text that is intended to separate the presentation of a document from its data. A template defines placeholders and various bits of basic logic — tags — that regulate how the document should be displayed. Usually, templates are used for outputting HTML but Django templates are equally capable of generating any text-based format.
The two key features of Django templates are that they are not, on their own, very powerful (in particular, no functions may be called with parameters), and a flexible, extensible tag system which allows users to break out of its constraints. This tends to prevent logic other than presentation logic from creeping into templates.
An example template built with the Django template language.
<html>
<head>
<title>{{ site.title }}</title>
</head>
<body>
<h1>{{ site.greeting }}</h1>
<ul>
{% for item in menu_items %}
<li>{{ item|upper }}</li>
{% endfor %}
</ul>
</body>
</html>
See the official documentation for more details.