Jinja2 Loops and Conditionals
Render lists and branch markup in templates.
Markup That Reacts
Sometimes you must repeat rows or hide a section. Jinja2 adds logic tags so your template can loop and branch over data.
The Statement Delimiter
Logic uses {% %}, not double braces. Braces output a value, while percent tags run control flow like loops and conditions.
All lessons in this course
- render_template and the templates Folder
- Pass Data into a Template
- Jinja2 Loops and Conditionals
- Autoescaping and the safe Filter