This commit is contained in:
Marsway 2026-01-13 02:27:32 +08:00
parent 96ef2cf88c
commit eb2ebd13f9
1 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,8 @@ class JobAdmin(ModelView, model=Job):
list_template = "job_list.html" list_template = "job_list.html"
# 编辑页排除 secret_cfg避免回显密文由自定义模板额外渲染一个空输入框 # 编辑页排除 secret_cfg避免回显密文由自定义模板额外渲染一个空输入框
form_edit_rules = [Job.id, Job.enabled, Job.cron_expr, Job.handler_path, Job.public_cfg] # 注意SQLAdmin 这里需要字段名字符串(不是 SQLAlchemy Column 对象)
form_edit_rules = ["id", "enabled", "cron_expr", "handler_path", "public_cfg"]
column_labels = { column_labels = {
"id": "任务ID", "id": "任务ID",