{% with messages = get_flashed_messages() %} {% if messages %}
Error
{% for message in messages %} {{ message }}
{% endfor %}
back
{% else %}
Tweets from {{ user }} matching '{{ pattern }}'
back
{% for tweet in tweets %}
{{ tweet.date }}
{# We want to keep the
tags in the raw text, the rest is already escaped for us by Twitter #} {% autoescape false %}
{{ tweet.text }}
{% endautoescape %} {% endfor %} {% endif %} {% endwith %}