禁用模板缓存,更改html之后马上生效
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user