禁用模板缓存,更改html之后马上生效

This commit is contained in:
liuwei
2025-04-02 13:34:27 +08:00
parent 769ca6fcbc
commit f85b1fd06b

View File

@@ -80,7 +80,8 @@ class DashboardServer:
"""创建Flask应用"""
app = Flask(__name__)
app.secret_key = "stats_dashboard_secret_key"
# 禁用模板缓存使修改HTML文件后立即生效
app.config['TEMPLATES_AUTO_RELOAD'] = True
# 静态文件目录
static_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static')