更新file页面类型字段

This commit is contained in:
jingrow 2026-04-16 20:19:16 +08:00
parent 515248499d
commit 58274729c3
2 changed files with 23 additions and 5 deletions

View File

@ -3,13 +3,14 @@
"allow_import": 1,
"creation": "2012-12-12 11:19:22",
"default_view": "File",
"pagetype": "PageType",
"engine": "InnoDB",
"field_order": [
"file_name",
"file_type",
"is_private",
"column_break_7jmm",
"file_type",
"title",
"description",
"preview",
"preview_html",
"section_break_5",
@ -36,6 +37,7 @@
"fieldname": "file_name",
"fieldtype": "Data",
"in_global_search": 1,
"in_list_view": 1,
"label": "File Name",
"oldfieldname": "file_name",
"oldfieldtype": "Data",
@ -184,17 +186,30 @@
"in_standard_filter": 1,
"label": "File Type",
"read_only": 1
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_global_search": 1,
"in_list_view": 1,
"label": "Title"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
}
],
"force_re_route_to_default_view": 1,
"icon": "fa fa-file",
"idx": 1,
"links": [],
"modified": "2025-01-15 11:46:42.917146",
"modified": "2026-04-16 20:18:52.578893",
"modified_by": "Administrator",
"module": "Core",
"name": "File",
"owner": "Administrator",
"pagetype": "PageType",
"permissions": [
{
"create": 1,
@ -217,9 +232,10 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "file_name",
"track_changes": 1
}
}

View File

@ -42,10 +42,11 @@ class File(Page):
if TYPE_CHECKING:
from jingrow.types import DF
attached_to_pagetype: DF.Link | None
attached_to_field: DF.Data | None
attached_to_name: DF.Data | None
attached_to_pagetype: DF.Link | None
content_hash: DF.Data | None
description: DF.SmallText | None
file_name: DF.Data | None
file_size: DF.Int
file_type: DF.Data | None
@ -57,6 +58,7 @@ class File(Page):
is_private: DF.Check
old_parent: DF.Data | None
thumbnail_url: DF.SmallText | None
title: DF.Data | None
uploaded_to_dropbox: DF.Check
uploaded_to_google_drive: DF.Check
# end: auto-generated types