filmov
tv
Python Flask Tutorial #6 - For loops within HTML Templates

Показать описание
Today we cover how to use for loops within HTML templates in Flask.
Flask comes with jinja2 by default, which enables us to use the {% for ... %}{% endfor %} syntax within HTML templates to use for loops. Most commonly, you can iterate over Python lists provided from a route as an argument.
Flask comes with jinja2 by default, which enables us to use the {% for ... %}{% endfor %} syntax within HTML templates to use for loops. Most commonly, you can iterate over Python lists provided from a route as an argument.