https://msiz07-flask-docs-ja.readthedocs.io/ja/latest/patterns/flashing.html
単にflash(‘You were successfully logged in’) をviews.pyに挿入した場合これでok
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
flash(‘You were successfully logged in’, ‘feedback’) 引数でカテゴリ指定した場合
{% with feedback = get_flashed_messages(category_filter=["feedback"]) %}
{% if feedback %}
<div class="message block-message feedback">
<a class="close" href="#">×</a>
<ul>
{%- for msg in feedback %}
<li>{{ msg }}</li>
{% endfor -%}
</ul>
</div>
{% endif %}
{% endwith %}