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.
