From 353082e7963f7fa19af725da64fa46115603d322 Mon Sep 17 00:00:00 2001 From: James Biggs <62654785+jamesbiggs@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:01:20 +0000 Subject: [PATCH] `PersonPage` contact field (#1790) --- .../0013_alter_blogpostpage_body.py | 22 +++++++++++++++++++ etna/core/blocks/contact.py | 1 + .../migrations/0043_alter_generalpage_body.py | 22 +++++++++++++++++++ etna/people/blocks.py | 2 ++ .../0016_alter_personpage_research_summary.py | 20 +++++++++++++++++ etna/people/models.py | 2 ++ 6 files changed, 69 insertions(+) create mode 100644 etna/blog/migrations/0013_alter_blogpostpage_body.py create mode 100644 etna/generic_pages/migrations/0043_alter_generalpage_body.py create mode 100644 etna/people/migrations/0016_alter_personpage_research_summary.py diff --git a/etna/blog/migrations/0013_alter_blogpostpage_body.py b/etna/blog/migrations/0013_alter_blogpostpage_body.py new file mode 100644 index 000000000..4728544e9 --- /dev/null +++ b/etna/blog/migrations/0013_alter_blogpostpage_body.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1.5 on 2025-01-30 16:02 +# etna:allowAlterField + +import django.core.validators +import etna.records.blocks +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0012_blogindexpage_short_title_blogpage_short_title_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='blogpostpage', + name='body', + field=wagtail.fields.StreamField([('call_to_action', 6), ('contact', 13), ('document', 17), ('featured_external_link', 22), ('featured_page', 25), ('image', 29), ('image_gallery', 31), ('inset_text', 33), ('media', 37), ('paragraph', 33), ('quote', 40), ('record', 42), ('table', 44), ('youtube_video', 50), ('content_section', 55)], block_lookup={0: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul'], 'max_length': 100}), 1: ('wagtail.blocks.CharBlock', (), {}), 2: ('etna.core.blocks.page_chooser.APIPageChooserBlock', (), {'required': False}), 3: ('wagtail.blocks.URLBlock', (), {'required': False}), 4: ('wagtail.blocks.BooleanBlock', (), {'help_text': 'Use the accented button style', 'label': 'Accented', 'required': False}), 5: ('wagtail.blocks.StructBlock', [[('label', 1), ('link', 2), ('external_link', 3), ('accented', 4)]], {}), 6: ('wagtail.blocks.StructBlock', [[('body', 0), ('button', 5)]], {}), 7: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['link'], 'required': False}), 8: ('wagtail.blocks.TextBlock', (), {'features': ['bold', 'italic', 'link'], 'required': False}), 9: ('wagtail.blocks.CharBlock', (), {'required': False}), 10: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'required': False}), 11: ('wagtail.blocks.EmailBlock', (), {'required': False}), 12: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link'], 'required': False}), 13: ('wagtail.blocks.StructBlock', [[('title', 1), ('body', 7), ('address', 8), ('telephone', 9), ('chat_link', 3), ('chat_note', 10), ('email', 11), ('website_link', 3), ('social_media', 12)]], {}), 14: ('wagtail.documents.blocks.DocumentChooserBlock', (), {'required': True}), 15: ('wagtail.blocks.StructBlock', [[('file', 14)]], {}), 16: ('wagtail.blocks.ListBlock', (15,), {}), 17: ('wagtail.blocks.StructBlock', [[('documents', 16)]], {}), 18: ('wagtail.blocks.CharBlock', (), {'label': 'Title', 'max_length': 100}), 19: ('wagtail.blocks.CharBlock', (), {'label': 'Description'}), 20: ('wagtail.blocks.URLBlock', (), {'label': 'URL'}), 21: ('etna.core.blocks.image.APIImageChooserBlock', (), {'label': 'Image', 'required': False}), 22: ('wagtail.blocks.StructBlock', [[('title', 18), ('description', 19), ('url', 20), ('image', 21)]], {}), 23: ('etna.core.blocks.page_chooser.APIPageChooserBlock', (), {'label': 'Page', 'page_type': ['wagtailcore.Page'], 'required': True}), 24: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional override for the teaser text', 'label': 'Teaser text override', 'required': False}), 25: ('wagtail.blocks.StructBlock', [[('page', 23), ('teaser_text', 24)]], {}), 26: ('etna.core.blocks.image.APIImageChooserBlock', (), {'rendition_size': 'max-900x900', 'required': True}), 27: ('wagtail.blocks.CharBlock', (), {'help_text': 'Alternative (alt) text describes images when they fail to load, and is read aloud by assistive technologies. Use a maximum of 100 characters to describe your image. Check the guidance for tips on writing alt text.', 'label': 'Alternative text', 'max_length': 100}), 28: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link'], 'help_text': 'If provided, displays directly below the image. Can be used to specify sources, transcripts or other useful metadata.', 'label': 'Caption (optional)', 'required': False}), 29: ('wagtail.blocks.StructBlock', [[('image', 26), ('alt_text', 27), ('caption', 28)]], {}), 30: ('wagtail.blocks.ListBlock', (29,), {}), 31: ('wagtail.blocks.StructBlock', [[('title', 9), ('description', 12), ('images', 30)]], {}), 32: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul']}), 33: ('wagtail.blocks.StructBlock', [[('text', 32)]], {}), 34: ('wagtail.blocks.CharBlock', (), {'help_text': 'A descriptive title for the media block', 'required': True}), 35: ('etna.core.blocks.image.APIImageChooserBlock', (), {'help_text': 'A thumbnail image for the media block', 'required': False}), 36: ('etna.media.blocks.MediaChooserBlock', (), {}), 37: ('wagtail.blocks.StructBlock', [[('title', 34), ('thumbnail', 35), ('media', 36)]], {}), 38: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul'], 'required': True}), 39: ('wagtail.blocks.CharBlock', (), {'max_length': 100, 'required': False}), 40: ('wagtail.blocks.StructBlock', [[('quote', 38), ('attribution', 39)]], {}), 41: ('wagtail.blocks.ListBlock', (etna.records.blocks.RecordLinkBlock,), {'label': 'Items'}), 42: ('wagtail.blocks.StructBlock', [[('items', 41)]], {}), 43: ('wagtail.contrib.table_block.blocks.TableBlock', (), {'table_options': {'contextMenu': ['row_above', 'row_below', '---------', 'col_left', 'col_right', '---------', 'remove_row', 'remove_col', '---------', 'undo', 'redo', '---------', 'alignment']}}), 44: ('wagtail.blocks.StructBlock', [[('table', 43)]], {}), 45: ('wagtail.blocks.CharBlock', (), {'label': 'Title', 'max_length': 100, 'required': True}), 46: ('wagtail.blocks.CharBlock', (), {'label': 'YouTube Video ID', 'max_length': 11, 'required': True, 'validators': [django.core.validators.RegexValidator(message='Invalid YouTube Video ID', regex='^[a-zA-Z0-9_-]{11}$')]}), 47: ('etna.core.blocks.image.APIImageChooserBlock', (), {'label': 'Preview Image', 'rendition_size': 'fill-640x360', 'required': True}), 48: ('wagtail.blocks.RichTextBlock', (), {'label': 'Transcript', 'required': False}), 49: ('wagtail.blocks.BooleanBlock', (), {'help_text': 'Tick if the video has captions on YouTube', 'label': 'Captions available', 'required': False}), 50: ('wagtail.blocks.StructBlock', [[('title', 45), ('video_id', 46), ('preview_image', 47), ('transcript', 48), ('captions_available', 49)]], {}), 51: ('wagtail.blocks.CharBlock', (), {'label': 'Heading', 'max_length': 100}), 52: ('wagtail.blocks.CharBlock', (), {'label': 'Sub-heading', 'max_length': 100}), 53: ('wagtail.blocks.StructBlock', [[('heading', 52)]], {}), 54: ('wagtail.blocks.StreamBlock', [[('call_to_action', 6), ('contact', 13), ('document', 17), ('featured_external_link', 22), ('featured_page', 25), ('image', 29), ('image_gallery', 31), ('inset_text', 33), ('media', 37), ('paragraph', 33), ('quote', 40), ('record', 42), ('sub_heading', 53), ('table', 44), ('youtube_video', 50)]], {'required': False}), 55: ('wagtail.blocks.StructBlock', [[('heading', 51), ('content', 54)]], {})}), + ), + ] diff --git a/etna/core/blocks/contact.py b/etna/core/blocks/contact.py index 986f3deff..89e1200e9 100644 --- a/etna/core/blocks/contact.py +++ b/etna/core/blocks/contact.py @@ -6,6 +6,7 @@ class ContactBlock(blocks.StructBlock): title = blocks.CharBlock() + body = APIRichTextBlock(required=False, features=["link"]) address = blocks.TextBlock( required=False, features=settings.INLINE_RICH_TEXT_FEATURES ) diff --git a/etna/generic_pages/migrations/0043_alter_generalpage_body.py b/etna/generic_pages/migrations/0043_alter_generalpage_body.py new file mode 100644 index 000000000..3bc8101cf --- /dev/null +++ b/etna/generic_pages/migrations/0043_alter_generalpage_body.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1.5 on 2025-01-30 16:02 +# etna:allowAlterField + +import django.core.validators +import etna.records.blocks +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('generic_pages', '0042_generalpage_short_title_hubpage_short_title'), + ] + + operations = [ + migrations.AlterField( + model_name='generalpage', + name='body', + field=wagtail.fields.StreamField([('accordions', 10), ('button', 15), ('call_to_action', 17), ('contact', 24), ('description_list', 28), ('details', 29), ('document', 6), ('do_dont_list', 34), ('featured_external_link', 39), ('featured_page', 42), ('featured_record_article', 44), ('image', 48), ('image_gallery', 50), ('inset_text', 52), ('media', 56), ('paragraph', 52), ('promoted_item', 68), ('quote', 70), ('record_links', 72), ('table', 74), ('warning_text', 75), ('youtube_video', 81), ('content_section', 88)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'required': True}), 1: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul'], 'required': True}), 2: ('wagtail.contrib.table_block.blocks.TableBlock', (), {}), 3: ('wagtail.documents.blocks.DocumentChooserBlock', (), {'required': True}), 4: ('wagtail.blocks.StructBlock', [[('file', 3)]], {}), 5: ('wagtail.blocks.ListBlock', (4,), {}), 6: ('wagtail.blocks.StructBlock', [[('documents', 5)]], {}), 7: ('wagtail.blocks.StreamBlock', [[('text', 1), ('table', 2), ('documents', 6)]], {}), 8: ('wagtail.blocks.StructBlock', [[('title', 0), ('body', 7)]], {}), 9: ('wagtail.blocks.ListBlock', (8,), {}), 10: ('wagtail.blocks.StructBlock', [[('items', 9)]], {}), 11: ('wagtail.blocks.CharBlock', (), {}), 12: ('etna.core.blocks.page_chooser.APIPageChooserBlock', (), {'required': False}), 13: ('wagtail.blocks.URLBlock', (), {'required': False}), 14: ('wagtail.blocks.BooleanBlock', (), {'help_text': 'Use the accented button style', 'label': 'Accented', 'required': False}), 15: ('wagtail.blocks.StructBlock', [[('label', 11), ('link', 12), ('external_link', 13), ('accented', 14)]], {}), 16: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul'], 'max_length': 100}), 17: ('wagtail.blocks.StructBlock', [[('body', 16), ('button', 15)]], {}), 18: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['link'], 'required': False}), 19: ('wagtail.blocks.TextBlock', (), {'features': ['bold', 'italic', 'link'], 'required': False}), 20: ('wagtail.blocks.CharBlock', (), {'required': False}), 21: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'required': False}), 22: ('wagtail.blocks.EmailBlock', (), {'required': False}), 23: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link'], 'required': False}), 24: ('wagtail.blocks.StructBlock', [[('title', 11), ('body', 18), ('address', 19), ('telephone', 20), ('chat_link', 13), ('chat_note', 21), ('email', 22), ('website_link', 13), ('social_media', 23)]], {}), 25: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link']}), 26: ('wagtail.blocks.StructBlock', [[('term', 0), ('detail', 25)]], {}), 27: ('wagtail.blocks.ListBlock', (26,), {}), 28: ('wagtail.blocks.StructBlock', [[('items', 27)]], {}), 29: ('wagtail.blocks.StructBlock', [[('title', 0), ('body', 1)]], {}), 30: ('wagtail.blocks.StructBlock', [[('text', 25)]], {'icon': 'check', 'label': 'Do item'}), 31: ('wagtail.blocks.ListBlock', (30,), {'label': 'Dos'}), 32: ('wagtail.blocks.StructBlock', [[('text', 25)]], {'icon': 'cross', 'label': "Don't item"}), 33: ('wagtail.blocks.ListBlock', (32,), {'label': "Don'ts"}), 34: ('wagtail.blocks.StructBlock', [[('do', 31), ('dont', 33)]], {}), 35: ('wagtail.blocks.CharBlock', (), {'label': 'Title', 'max_length': 100}), 36: ('wagtail.blocks.CharBlock', (), {'label': 'Description'}), 37: ('wagtail.blocks.URLBlock', (), {'label': 'URL'}), 38: ('etna.core.blocks.image.APIImageChooserBlock', (), {'label': 'Image', 'required': False}), 39: ('wagtail.blocks.StructBlock', [[('title', 35), ('description', 36), ('url', 37), ('image', 38)]], {}), 40: ('etna.core.blocks.page_chooser.APIPageChooserBlock', (), {'label': 'Page', 'page_type': ['wagtailcore.Page'], 'required': True}), 41: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional override for the teaser text', 'label': 'Teaser text override', 'required': False}), 42: ('wagtail.blocks.StructBlock', [[('page', 40), ('teaser_text', 41)]], {}), 43: ('etna.core.blocks.page_chooser.APIPageChooserBlock', (), {'label': 'Page', 'page_type': ['articles.RecordArticlePage'], 'required_api_fields': ['teaser_image']}), 44: ('wagtail.blocks.StructBlock', [[('page', 43)]], {}), 45: ('etna.core.blocks.image.APIImageChooserBlock', (), {'rendition_size': 'max-900x900', 'required': True}), 46: ('wagtail.blocks.CharBlock', (), {'help_text': 'Alternative (alt) text describes images when they fail to load, and is read aloud by assistive technologies. Use a maximum of 100 characters to describe your image. Check the guidance for tips on writing alt text.', 'label': 'Alternative text', 'max_length': 100}), 47: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link'], 'help_text': 'If provided, displays directly below the image. Can be used to specify sources, transcripts or other useful metadata.', 'label': 'Caption (optional)', 'required': False}), 48: ('wagtail.blocks.StructBlock', [[('image', 45), ('alt_text', 46), ('caption', 47)]], {}), 49: ('wagtail.blocks.ListBlock', (48,), {}), 50: ('wagtail.blocks.StructBlock', [[('title', 20), ('description', 23), ('images', 49)]], {}), 51: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul']}), 52: ('wagtail.blocks.StructBlock', [[('text', 51)]], {}), 53: ('wagtail.blocks.CharBlock', (), {'help_text': 'A descriptive title for the media block', 'required': True}), 54: ('etna.core.blocks.image.APIImageChooserBlock', (), {'help_text': 'A thumbnail image for the media block', 'required': False}), 55: ('etna.media.blocks.MediaChooserBlock', (), {}), 56: ('wagtail.blocks.StructBlock', [[('title', 53), ('thumbnail', 54), ('media', 55)]], {}), 57: ('wagtail.blocks.CharBlock', (), {'help_text': 'Title of the promoted page', 'label': 'Title', 'max_length': 100}), 58: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('blog', 'Blog post'), ('podcast', 'Podcast'), ('video', 'Video'), ('video-external', 'External video'), ('external-link', 'External link')], 'label': 'Category'}), 59: ('wagtail.blocks.CharBlock', (), {'help_text': 'This is a free text field. Please enter date as per agreed format: 14 April 2021', 'required': False}), 60: ('wagtail.blocks.CharBlock', (), {'help_text': 'Podcast or video duration.', 'label': 'Duration', 'max_length': 50, 'required': False}), 61: ('wagtail.blocks.URLBlock', (), {'help_text': 'URL for the external page', 'label': 'External URL'}), 62: ('wagtail.blocks.BooleanBlock', (), {'label': "Should this URL open in a new tab?
Tick the box if 'yes'
", 'required': False}), 63: ('wagtail.blocks.CharBlock', (), {'help_text': "The text displayed on the button for your URL. If your URL links to an external site, please add the name of the site users will land on, and what they will find on this page. For example 'Watch our short film about Shakespeare on YouTube'.", 'label': 'Call to action label', 'max_length': 50}), 64: ('wagtail.blocks.BooleanBlock', (), {'default': False, 'help_text': 'Decorative images are used for visual effect and do not add information to the content of a page. "Check the guidance to see if your image is decorative.', 'label': "Is this image decorative?Tick the box if 'yes'
", 'required': False}), 65: ('wagtail.blocks.CharBlock', (), {'help_text': 'Alternative (alt) text describes images when they fail to load, and is read aloud by assistive technologies. Use a maximum of 100 characters to describe your image. Decorative images do not require alt text. Check the guidance for tips on writing alt text.', 'label': 'Image alternative text', 'max_length': 100, 'required': False}), 66: ('wagtail.blocks.StructBlock', [[('image', 45), ('decorative', 64), ('alt_text', 65)]], {'label': 'Teaser image', 'template': 'articles/blocks/images/blog-embed__image-container.html'}), 67: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link'], 'help_text': 'A description of the promoted page'}), 68: ('wagtail.blocks.StructBlock', [[('title', 57), ('category', 58), ('publication_date', 59), ('author', 20), ('duration', 60), ('url', 61), ('target_blank', 62), ('cta_label', 63), ('image', 66), ('description', 67)]], {}), 69: ('wagtail.blocks.CharBlock', (), {'max_length': 100, 'required': False}), 70: ('wagtail.blocks.StructBlock', [[('quote', 1), ('attribution', 69)]], {}), 71: ('wagtail.blocks.ListBlock', (etna.records.blocks.RecordLinkBlock,), {'label': 'Items'}), 72: ('wagtail.blocks.StructBlock', [[('items', 71)]], {}), 73: ('wagtail.contrib.table_block.blocks.TableBlock', (), {'table_options': {'contextMenu': ['row_above', 'row_below', '---------', 'col_left', 'col_right', '---------', 'remove_row', 'remove_col', '---------', 'undo', 'redo', '---------', 'alignment']}}), 74: ('wagtail.blocks.StructBlock', [[('table', 73)]], {}), 75: ('wagtail.blocks.StructBlock', [[('body', 51)]], {}), 76: ('wagtail.blocks.CharBlock', (), {'label': 'Title', 'max_length': 100, 'required': True}), 77: ('wagtail.blocks.CharBlock', (), {'label': 'YouTube Video ID', 'max_length': 11, 'required': True, 'validators': [django.core.validators.RegexValidator(message='Invalid YouTube Video ID', regex='^[a-zA-Z0-9_-]{11}$')]}), 78: ('etna.core.blocks.image.APIImageChooserBlock', (), {'label': 'Preview Image', 'rendition_size': 'fill-640x360', 'required': True}), 79: ('wagtail.blocks.RichTextBlock', (), {'label': 'Transcript', 'required': False}), 80: ('wagtail.blocks.BooleanBlock', (), {'help_text': 'Tick if the video has captions on YouTube', 'label': 'Captions available', 'required': False}), 81: ('wagtail.blocks.StructBlock', [[('title', 76), ('video_id', 77), ('preview_image', 78), ('transcript', 79), ('captions_available', 80)]], {}), 82: ('wagtail.blocks.CharBlock', (), {'label': 'Heading', 'max_length': 100}), 83: ('wagtail.blocks.CharBlock', (), {'label': 'Sub-heading', 'max_length': 100}), 84: ('wagtail.blocks.StructBlock', [[('heading', 83)]], {}), 85: ('wagtail.blocks.CharBlock', (), {'label': 'Sub-sub-heading', 'max_length': 100}), 86: ('wagtail.blocks.StructBlock', [[('heading', 85)]], {}), 87: ('wagtail.blocks.StreamBlock', [[('accordions', 10), ('button', 15), ('call_to_action', 17), ('contact', 24), ('description_list', 28), ('details', 29), ('document', 6), ('do_dont_list', 34), ('featured_external_link', 39), ('featured_page', 42), ('featured_record_article', 44), ('image', 48), ('image_gallery', 50), ('inset_text', 52), ('media', 56), ('paragraph', 52), ('promoted_item', 68), ('quote', 70), ('record_links', 72), ('sub_heading', 84), ('sub_sub_heading', 86), ('table', 74), ('warning_text', 75), ('youtube_video', 81)]], {'required': False}), 88: ('wagtail.blocks.StructBlock', [[('heading', 82), ('content', 87)]], {})}, null=True), + ), + ] diff --git a/etna/people/blocks.py b/etna/people/blocks.py index 8ec7b9323..d478ed59b 100644 --- a/etna/people/blocks.py +++ b/etna/people/blocks.py @@ -1,6 +1,7 @@ from wagtail import blocks from etna.core.blocks import ( + ContactBlock, InsetTextBlock, ParagraphBlock, SectionDepthAwareStructBlock, @@ -8,6 +9,7 @@ class SectionContentBlock(blocks.StreamBlock): + contact = ContactBlock() inset_text = InsetTextBlock() paragraph = ParagraphBlock() diff --git a/etna/people/migrations/0016_alter_personpage_research_summary.py b/etna/people/migrations/0016_alter_personpage_research_summary.py new file mode 100644 index 000000000..e34e266c4 --- /dev/null +++ b/etna/people/migrations/0016_alter_personpage_research_summary.py @@ -0,0 +1,20 @@ +# Generated by Django 5.1.5 on 2025-01-30 16:02 +# etna:allowAlterField + +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('people', '0015_peopleindexpage_short_title_personpage_short_title'), + ] + + operations = [ + migrations.AlterField( + model_name='personpage', + name='research_summary', + field=wagtail.fields.StreamField([('contact', 8), ('inset_text', 10), ('paragraph', 10), ('content_section', 13)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {}), 1: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['link'], 'required': False}), 2: ('wagtail.blocks.TextBlock', (), {'features': ['bold', 'italic', 'link'], 'required': False}), 3: ('wagtail.blocks.CharBlock', (), {'required': False}), 4: ('wagtail.blocks.URLBlock', (), {'required': False}), 5: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'required': False}), 6: ('wagtail.blocks.EmailBlock', (), {'required': False}), 7: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link'], 'required': False}), 8: ('wagtail.blocks.StructBlock', [[('title', 0), ('body', 1), ('address', 2), ('telephone', 3), ('chat_link', 4), ('chat_note', 5), ('email', 6), ('website_link', 4), ('social_media', 7)]], {}), 9: ('etna.core.blocks.paragraph.APIRichTextBlock', (), {'features': ['bold', 'italic', 'link', 'ol', 'ul']}), 10: ('wagtail.blocks.StructBlock', [[('text', 9)]], {}), 11: ('wagtail.blocks.CharBlock', (), {'label': 'Heading', 'max_length': 100}), 12: ('wagtail.blocks.StreamBlock', [[('contact', 8), ('inset_text', 10), ('paragraph', 10)]], {'required': False}), 13: ('wagtail.blocks.StructBlock', [[('heading', 11), ('content', 12)]], {})}, null=True), + ), + ] diff --git a/etna/people/models.py b/etna/people/models.py index ab9264d8b..650d04845 100644 --- a/etna/people/models.py +++ b/etna/people/models.py @@ -109,7 +109,9 @@ class PersonPage(BasePage): on_delete=models.SET_NULL, related_name="+", ) + role = models.CharField(max_length=100) + summary = RichTextField(features=settings.RESTRICTED_RICH_TEXT_FEATURES) research_summary = StreamField(ResearchSummaryStreamBlock, blank=True, null=True)