Skip to content

Commit

Permalink
ExhibitionPage related pages description (#1796)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Feb 11, 2025
1 parent 50e1fb1 commit 08c052b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.1.5 on 2025-02-11 12:12

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('whatson', '0018_exhibitionpage_short_title_whatsonpage_short_title_and_more'),
]

operations = [
migrations.AddField(
model_name='exhibitionpage',
name='related_pages_description',
field=wagtail.fields.RichTextField(blank=True, help_text='The description to display for the related content section.'),
),
]
8 changes: 8 additions & 0 deletions etna/whatson/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,12 @@ class ExhibitionPage(
help_text=_("The title to display for the related content section."),
)

related_pages_description = RichTextField(
blank=True,
help_text=_("The description to display for the related content section."),
features=settings.INLINE_RICH_TEXT_FEATURES,
)

featured_page = models.ForeignKey(
"wagtailcore.Page",
null=True,
Expand Down Expand Up @@ -991,6 +997,7 @@ class Meta:
MultiFieldPanel(
[
FieldPanel("related_pages_title"),
FieldPanel("related_pages_description"),
FieldPanel("featured_page"),
FieldPanel("related_pages"),
FieldPanel("event_title"),
Expand Down Expand Up @@ -1085,6 +1092,7 @@ class Meta:
APIField("video_title"),
APIField("video"),
APIField("related_pages_title"),
APIField("related_pages_description", serializer=RichTextSerializer()),
APIField("featured_page", serializer=DefaultPageSerializer()),
APIField("related_pages"),
APIField("event_title"),
Expand Down

0 comments on commit 08c052b

Please sign in to comment.