0PricingLogin
Flask Academy · Lesson

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

  1. render_template and the templates Folder
  2. Pass Data into a Template
  3. Jinja2 Loops and Conditionals
  4. Autoescaping and the safe Filter
← Back to Flask Academy