add excerpt field to associations
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
# Generated by Django 5.0.6 on 2024-05-20 17:03
|
||||
|
||||
import wagtail.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('associations', '0006_alter_associationpage_logo'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='associationpage',
|
||||
name='excerpt',
|
||||
field=wagtail.fields.RichTextField(default=''),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0.6 on 2024-05-20 17:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('associations', '0007_associationpage_excerpt'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='associationpage',
|
||||
name='excerpt',
|
||||
field=models.TextField(max_length=512),
|
||||
),
|
||||
]
|
@ -43,6 +43,7 @@ class AssociationPage(Page):
|
||||
FORENING = "forening", "Forening"
|
||||
UTVALG = "utvalg", "Utvalg"
|
||||
|
||||
excerpt = models.TextField(max_length=512, blank=False)
|
||||
body = StreamField(
|
||||
[
|
||||
("paragraph", blocks.RichTextBlock()),
|
||||
@ -61,6 +62,11 @@ class AssociationPage(Page):
|
||||
website_url = models.URLField()
|
||||
|
||||
content_panels = Page.content_panels + [
|
||||
FieldPanel(
|
||||
"excerpt",
|
||||
heading="Utdrag",
|
||||
help_text="En veldig kort oppsummering av innholdet nedenfor. Brukes i listevisninger.",
|
||||
),
|
||||
FieldPanel("body"),
|
||||
FieldPanel("logo"),
|
||||
FieldPanel("association_type", heading="Type"),
|
||||
@ -68,6 +74,7 @@ class AssociationPage(Page):
|
||||
]
|
||||
|
||||
graphql_fields = [
|
||||
GraphQLString("excerpt"),
|
||||
GraphQLStreamfield("body"),
|
||||
GraphQLImage("logo"),
|
||||
GraphQLString("website_url"),
|
||||
|
Reference in New Issue
Block a user