Guided Notes
Templates
Rendering dynamic HTML with Django's template language.
The template language
Slide 1 / 5Django templates are HTML files with three kinds of special syntax:
β’ {{ variable }} β output a value. β’ {% tag %} β logic: loops, conditions, loading, inheritance. β’ {{ value|filter }} β transform a value for display.
Templates deliberately keep logic simple β complex calculations belong in views or models, keeping HTML readable for designers.