add lead to events
This commit is contained in:
19
dnscms/events/migrations/0053_eventpage_lead.py
Normal file
19
dnscms/events/migrations/0053_eventpage_lead.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.0.7 on 2024-08-09 01:48
|
||||
|
||||
import wagtail.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('events', '0052_alter_eventpage_price_member_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='eventpage',
|
||||
name='lead',
|
||||
field=wagtail.fields.RichTextField(blank=True),
|
||||
),
|
||||
]
|
@ -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