需要在html文件中body中加入下列语句

<div class='container'>
<div class="row">
{% with messages = get_flashed_messages() %}
{% for message in messages %}
{% if message %}
<div class="alert alert-warning" role="alert">{{ message }}</div>
{% endif %}
{% endfor %}
{% endwith %}
{% if form and form.errors %}
{% for key, error in form.errors.items() %}
<div class="alert alert-warning" role="alert">{{ error }}</div>
{% endfor %}
{% endif %}
</div>
</div>

相关文章:

  • 2021-11-28
  • 2022-02-05
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-12-13
  • 2021-06-20
  • 2021-05-18
猜你喜欢
  • 2021-11-28
  • 2021-12-27
  • 2022-03-02
  • 2021-12-27
  • 2021-11-07
  • 2021-09-14
  • 2022-12-23
相关资源
相似解决方案