From 4a2e96f9b80d0289e49cf01816ee4cb38e943b41 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 28 May 2025 16:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=A5=E5=BF=97=E7=BA=A7?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/server.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/admin/dashboard/server.py b/admin/dashboard/server.py index a82b403..9608786 100644 --- a/admin/dashboard/server.py +++ b/admin/dashboard/server.py @@ -102,10 +102,14 @@ class DashboardServer: app.secret_key = "stats_dashboard_secret_key" # 禁用模板缓存,使修改HTML文件后立即生效 app.config['TEMPLATES_AUTO_RELOAD'] = True - + + # 设置Werkzeug日志级别为DEBUG + import logging + logging.getLogger('werkzeug').setLevel(logging.DEBUG) + # 将dashboard_server实例设置为app的属性 app.dashboard_server = self - + # 配置静态文件访问 static_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static')