Explorar o código

feat: 添加闪现消息的显示

SongZihuan %!s(int64=3) %!d(string=hai) anos
pai
achega
01073a90c8
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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 %}