add lead to associations
This commit is contained in:
19
dnscms/associations/migrations/0025_associationpage_lead.py
Normal file
19
dnscms/associations/migrations/0025_associationpage_lead.py
Normal 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),
|
||||
),
|
||||
]
|
@ -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"),
|
||||
|
Reference in New Issue
Block a user