add lead to events
This commit is contained in:
@ -11,6 +11,7 @@ from grapple.models import (
|
||||
GraphQLCollection,
|
||||
GraphQLForeignKey,
|
||||
GraphQLImage,
|
||||
GraphQLRichText,
|
||||
GraphQLStreamfield,
|
||||
GraphQLString,
|
||||
)
|
||||
@ -25,6 +26,7 @@ from wagtail.admin.panels import (
|
||||
MultipleChooserPanel,
|
||||
TitleFieldPanel,
|
||||
)
|
||||
from wagtail.fields import RichTextField
|
||||
from wagtail.models import Orderable, Page, PageManager, PageQuerySet
|
||||
from wagtail.search import index
|
||||
from wagtail.snippets.models import register_snippet
|
||||
@ -256,6 +258,7 @@ class EventPage(WPImportedPageMixin, Page):
|
||||
"La denne gjerne stå tom om du fikk plass til det meste i tittelen."
|
||||
),
|
||||
)
|
||||
lead = RichTextField(features=["italic", "link"], blank=True)
|
||||
body = CommonStreamField
|
||||
|
||||
categories = ParentalManyToManyField(
|
||||
@ -325,6 +328,7 @@ class EventPage(WPImportedPageMixin, Page):
|
||||
content_panels = Page.content_panels + [
|
||||
FieldPanel("subtitle", heading="Undertittel"),
|
||||
FieldPanel("featured_image"),
|
||||
FieldPanel("lead", heading="Ingress"),
|
||||
FieldPanel("body"),
|
||||
FieldPanel("categories", widget=forms.CheckboxSelectMultiple),
|
||||
MultiFieldPanel(
|
||||
@ -362,6 +366,7 @@ class EventPage(WPImportedPageMixin, Page):
|
||||
graphql_fields = [
|
||||
GraphQLString("subtitle"),
|
||||
GraphQLImage("featured_image"),
|
||||
GraphQLRichText("lead"),
|
||||
GraphQLStreamfield("body"),
|
||||
GraphQLString("pig"),
|
||||
GraphQLString("ticket_url"),
|
||||
|
Reference in New Issue
Block a user