I'm trying to convert this html
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-danger" role="alert">
Error: {{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
to jade. I tried
with messages = get_flashed_messages()
if messages
for message in messages
.alert.alert-danger(role="alert")
Error: {{message}}
endfor
endif
endwith
But "messages = get_flashed_messages()" just gets printed to the page. I'm still a bit confused about when to use jade syntax and when to use flask/Jinja2 syntax.