chore: initial commit of Wagtail backend scaffold
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from wagtail.admin.panels import FieldPanel
|
||||
from wagtail.fields import StreamField
|
||||
|
||||
from apps.core.blocks import COMMON_BLOCKS
|
||||
from apps.core.models import SEOablePage
|
||||
|
||||
|
||||
class HomePage(SEOablePage):
|
||||
"""企业官网首页,使用通用组件化 StreamField 拼装页面内容。"""
|
||||
|
||||
body = StreamField(COMMON_BLOCKS, use_json_field=True, blank=True)
|
||||
|
||||
content_panels = SEOablePage.content_panels + [
|
||||
FieldPanel("body"),
|
||||
]
|
||||
|
||||
subpage_types = [
|
||||
"blog.BlogIndexPage",
|
||||
]
|
||||
|
||||
class Meta:
|
||||
verbose_name = "首页"
|
||||
Reference in New Issue
Block a user