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.