29 lines
760 B
Python
29 lines
760 B
Python
from grapple.models import GraphQLStreamfield
|
|
from wagtail import blocks
|
|
from wagtail.admin.panels import FieldPanel
|
|
from wagtail.fields import StreamField
|
|
from wagtail.models import Page
|
|
|
|
from dnscms.blocks import ImageSliderBlock, ImageWithTextBlock
|
|
|
|
|
|
class GenericPage(Page):
|
|
subpage_types = ["generic.GenericPage"]
|
|
show_in_menus = True
|
|
|
|
body = StreamField(
|
|
[
|
|
("paragraph", blocks.RichTextBlock(label="Rik tekst")),
|
|
("image", ImageWithTextBlock(label="Bilde")),
|
|
("image_slider", ImageSliderBlock(label="Bildegalleri")),
|
|
]
|
|
)
|
|
|
|
content_panels = Page.content_panels + [
|
|
FieldPanel("body", heading="Innhold"),
|
|
]
|
|
|
|
graphql_fields = [
|
|
GraphQLStreamfield("body"),
|
|
]
|