I have the following page model on my website
class MyPage(Page):
questions = StreamField(
[
(
"question",
blocks.StructBlock(
[
("question", blocks.CharBlock()),
(
"answers",
blocks.ListBlock(
blocks.StructBlock(
[
("answer", blocks.CharBlock()),
(
"correct",
blocks.BooleanBlock(
required=False, default=False
),
),
]
),
min_num=2,
),
),
]
),
),
]
)
content_panels = Page.content_panels + [
FieldPanel('questions')
]
I asked a similar question a few months ago about how to test page creation but now I have a page model which has a more complex structure for the stream field, and I don’t know what to put in this case where it is a multilevel block structure. What does the stream_field supposed to look like for questions
?