浏览代码

feat: 添加闪现消息的显示

SongZihuan 3 年之前
父节点
当前提交
01073a90c8
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      templates/base.html

+ 9 - 0
templates/base.html

@@ -27,6 +27,15 @@
 
 <h1 class="text-center mt-2"> Welcome to {{ title }} ! </h1>
 
+<section class="container mt-2 mb-2">
+{% for message in get_flashed_messages() %}
+    <div class="alert alert-info">
+        <button type="button" class="close" data-dismiss="alert">&times;</button>
+        {{ message }}
+    </div>
+{% endfor %}
+</section>
+
 {% block body %} {% endblock %}
 
 {% block javascript %}