From 1ca37d6f313d8011d91a617fa872a68978715127 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 18 Apr 2025 13:42:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/dashboard/server.py b/admin/dashboard/server.py index 436cef0..7b6e879 100644 --- a/admin/dashboard/server.py +++ b/admin/dashboard/server.py @@ -88,6 +88,9 @@ class DashboardServer: # 禁用模板缓存,使修改HTML文件后立即生效 app.config['TEMPLATES_AUTO_RELOAD'] = True + # 将dashboard_server实例设置为app的属性 + app.dashboard_server = self + # 配置静态文件访问 static_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static')