I have an html template for Flask with Jinja2. The goal is print the "counter" along with name.
However, Jinja2 gives me an error for trying to convert the counter which is an int to a string. How do I get the "counter" + "name" inside of the div to work?
<p>
{% set counter = 0 -%}
{% for name in two_word_names %}
<div class=flash>{{ str(counter) + name }}</div>
{% counter += 1 -%}
{% endfor %}
</p>