Django Template Engine

Let's learn about templates and Django's templating engine.


As a web framework, Django needs a convenient way to generate HTML dynamically. The most common approach relies on templates. Templates are a key part of understanding how Django really works and interacts with our website. A template contains the static parts of the desired HTML output, as well as some special syntax describing how dynamic content will be inserted. We can think of the template as the scaffolding or skeleton of the page.

A template contains variables, which get replaced with values when the template is evaluated, and tags, which control the logic of the template.

Get hands-on with 1200+ tech skills courses.