私にはStreamFieldがある抽象クラスがあります。私はまた、BasePageから継承するクラスCustomPageを持っています。 CustomPageにコンテンツに新しいStructBlockを追加したい。それ、どうやったら出来るの?継承されたクラスのwagtail Streamfieldsを拡張する
class BasePage(Page):
content = StreamField([
('ad', ...),
('text', ...),
('img', ...),
])
content_panels = Page.content_panels + [
StreamFieldPanel('content'),
]
class Meta:
abstract = True
class CustomPage(BasePage):
# add ('custom_block', ...) to content streamfield.