0

次のような StructBlock があります。

class JumbotronBlock(blocks.StructBlock):
fullwidth= blocks.BooleanBlock(requried=False, help_text="Full width of the viewport")
heading= blocks.CharBlock(required=True, help_text="Heading for the jumbotron")
lead= blocks.CharBlock(required= False, help_text= "Lead text for Jumbotron")
link= LinkBlock(required=False)
bg_image= ImageChooserBlock(required=False)
bg_color= blocks.CharBlock(required=False, help_text="Hex value for background color")
classes= blocks.CharBlock(required=False, help_text="CSS classes for jumbotron")
styles= blocks.CharBlock(required=False, help_text="Custom style definitions for jumbotron")

class Meta:
    template="streams/jumbotron_block.html"
    icon= "placeholder"
    label= "Jumbotron"

My HomePage クラスのモデルは次のとおりです。

class HomePage(Page):
template= "home/home_page.html"
header= Jumbotron()

body =  StreamField([
    ('Richtext', RichTextBlock()),
    ('CTA', CTABlock()),
    ('Section', SectionBlock()),
    ])

content_panels = Page.content_panels + [
    ??which panel here??('header'),
    StreamFieldPanel('body'),
    ]

ジャンボトロンを編集パネルに追加するには、どのパネルを使用すればよいですか? ありがとう。

4

1 に答える 1