我想TableBlock
在我的管理面板中显示,但显示不正确。
这是代码块:
from wagtail.contrib.table_block.blocks import TableBlock
from wagtail.core.blocks import StreamBlock
from wagtail.core.fields import StreamField
class BaseStreamBlock(StreamBlock):
table = TableBlock()
class ArticlePage(Page):
parent_page_types = ['home.HomePage']
subpage_types = []
content = StreamField(BaseStreamBlock(), verbose_name=_('Content'), blank=True)
content_panels = [
MultiFieldPanel([
FieldPanel('title'),
]),
MultiFieldPanel(
[
StreamFieldPanel('content'),
]
),
]