Flask, one flash message not getting displayed
This question already has an answer here:
I think (but I'm not sure, because you didn't include the code of index
), that the template in index doesn't include the flash. You need to format the index page (or the base template) to display the flash.
Check the examples in: http://flask.pocoo.org/docs/0.12/patterns/flashing/, practically:
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
链接地址: http://www.djcxy.com/p/12472.html
上一篇: 处理另一个Ajax请求后调用ajax请求
下一篇: 烧瓶,一个闪光消息没有得到显示