add lead to associations

This commit is contained in:
2024-08-09 03:43:50 +02:00
parent d509a1a41d
commit c48c79848a
6 changed files with 37 additions and 7 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 5.0.7 on 2024-08-09 01:34
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('associations', '0024_alter_associationpage_website_url'),
]
operations = [
migrations.AddField(
model_name='associationpage',
name='lead',
field=wagtail.fields.RichTextField(blank=True),
),
]

View File

@ -47,6 +47,7 @@ class AssociationPage(WPImportedPageMixin, Page):
UTVALG = "utvalg", "Utvalg"
excerpt = models.TextField(max_length=512, blank=False)
lead = RichTextField(features=["italic", "link"], blank=True)
body = CommonStreamField
association_type = models.CharField(
max_length=64, choices=AssociationType, default=AssociationType.FORENING
@ -66,7 +67,8 @@ class AssociationPage(WPImportedPageMixin, Page):
heading="Utdrag",
help_text="En veldig kort oppsummering av innholdet nedenfor. Brukes i listevisninger.",
),
FieldPanel("body"),
FieldPanel("lead", heading="Ingress"),
FieldPanel("body", heading="Innhold"),
FieldPanel("logo"),
FieldPanel("association_type", heading="Type"),
FieldPanel("website_url", heading="Nettside"),
@ -74,6 +76,7 @@ class AssociationPage(WPImportedPageMixin, Page):
graphql_fields = [
GraphQLString("excerpt"),
GraphQLRichText("lead"),
GraphQLStreamfield("body"),
GraphQLImage("logo"),
GraphQLString("website_url"),