Is my FieldRowPanel wrong?
padding = FieldRowPanel([
FieldPanel(blocks.ChoiceBlock(
required=False, choices=PADDING_CHOICES, label="Отступ сверху")),
FieldPanel(blocks.ChoiceBlock(
required=False, choices=PADDING_CHOICES, label="Отступ снизу")),
], heading="Отступы")
I am trying to do it in this place:
class ContentBlockThemed(blocks.StructBlock):
theme = blocks.ChoiceBlock(
required=True, choices=BLOCK_THEMES_CHOICES, label="Тема")
padding = FieldRowPanel([
FieldPanel(blocks.ChoiceBlock(
required=False, choices=PADDING_CHOICES, label="Отступ сверху")),
FieldPanel(blocks.ChoiceBlock(
required=False, choices=PADDING_CHOICES, label="Отступ снизу")),
], heading="Отступы")
visible = blocks.BooleanBlock(required=False, label="Видимый", default=True, help_text="По умолчанию - True")
block_content = ContentBlock()
class Meta:
icon = 'user'
form_classname = 'content-block struct-block pages-content-block'
template = 'wtblocks/content_block.html'
Nothing is displayed in the admin, although there is no error