更新pagetype模板文件
This commit is contained in:
parent
c8aefd3953
commit
01a60017a2
@ -43,7 +43,8 @@ async def create_pagetypes(payload: Dict[str, Any]):
|
||||
if bp.exists():
|
||||
backend_exists = True
|
||||
else:
|
||||
bp.write_text("# coding: utf-8\n\n# Blank template for PageType backend hooks\n", encoding="utf-8")
|
||||
class_name = ''.join(word.capitalize() for word in slug.split('_'))
|
||||
bp.write_text("# Copyright (c) 2025, jingrow and contributors\n# For license information, please see license.txt\n\n# import jingrow\nfrom jingrow.model.page import Page\n\n\nclass " + class_name + "(Page):\n\tpass\n", encoding="utf-8")
|
||||
backend_path = str(bp)
|
||||
|
||||
return {
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
# coding: utf-8
|
||||
# Copyright (c) 2025, jingrow and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
# Blank template for PageType backend hooks
|
||||
# import jingrow
|
||||
from jingrow.model.page import Page
|
||||
|
||||
|
||||
class TestPage(Page):
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user