diff --git a/cdhweb/blog/migrations/0022_alter_blogpost_body.py b/cdhweb/blog/migrations/0022_alter_blogpost_body.py new file mode 100644 index 00000000..ba8ec6c9 --- /dev/null +++ b/cdhweb/blog/migrations/0022_alter_blogpost_body.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.5 on 2024-07-08 01:42 + +import cdhweb.pages.blocks.download_block +import cdhweb.pages.blocks.embed_block +import cdhweb.pages.blocks.migrated +import cdhweb.pages.blocks.newsletter +import cdhweb.pages.blocks.rich_text +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0021_alter_blogpost_attachments'), + ] + + operations = [ + migrations.AlterField( + model_name='blogpost', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + ] diff --git a/cdhweb/events/migrations/0022_alter_event_body.py b/cdhweb/events/migrations/0022_alter_event_body.py new file mode 100644 index 00000000..b79c912a --- /dev/null +++ b/cdhweb/events/migrations/0022_alter_event_body.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.5 on 2024-07-08 01:42 + +import cdhweb.pages.blocks.download_block +import cdhweb.pages.blocks.embed_block +import cdhweb.pages.blocks.migrated +import cdhweb.pages.blocks.newsletter +import cdhweb.pages.blocks.rich_text +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0021_alter_event_attachments'), + ] + + operations = [ + migrations.AlterField( + model_name='event', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + ] diff --git a/cdhweb/pages/blocks/embed_block.py b/cdhweb/pages/blocks/embed_block.py new file mode 100644 index 00000000..22be50bb --- /dev/null +++ b/cdhweb/pages/blocks/embed_block.py @@ -0,0 +1,14 @@ +from wagtail.embeds.blocks import EmbedBlock + + +class EmbedBlock(EmbedBlock): + class Meta: + icon = "warning" + group = "Deprecated" + + def __init__(self, *args, **kwargs): + kwargs[ + "help_text" + ] = """This block exists to help with data migration. It will be deleted when content loading is complete. + Please use the CDH Hosted Video instead. """ + super().__init__(*args, **kwargs) diff --git a/cdhweb/pages/migrations/0058_alter_contentpage_body_alter_homepage_body_and_more.py b/cdhweb/pages/migrations/0058_alter_contentpage_body_alter_homepage_body_and_more.py new file mode 100644 index 00000000..93d5f999 --- /dev/null +++ b/cdhweb/pages/migrations/0058_alter_contentpage_body_alter_homepage_body_and_more.py @@ -0,0 +1,38 @@ +# Generated by Django 5.0.5 on 2024-07-08 01:42 + +import cdhweb.pages.blocks.download_block +import cdhweb.pages.blocks.embed_block +import cdhweb.pages.blocks.migrated +import cdhweb.pages.blocks.newsletter +import cdhweb.pages.blocks.rich_text +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cdhpages', '0057_delete_pageintro'), + ] + + operations = [ + migrations.AlterField( + model_name='contentpage', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + migrations.AlterField( + model_name='homepage', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + migrations.AlterField( + model_name='landingpage', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + ] diff --git a/cdhweb/pages/models.py b/cdhweb/pages/models.py index c57ba842..176b98ba 100644 --- a/cdhweb/pages/models.py +++ b/cdhweb/pages/models.py @@ -21,7 +21,6 @@ from wagtail.contrib.settings.models import BaseSiteSetting, register_setting from wagtail.documents.blocks import DocumentChooserBlock from wagtail.documents.models import AbstractDocument, DocumentQuerySet -from wagtail.embeds.blocks import EmbedBlock from wagtail.fields import RichTextField, StreamField from wagtail.images.blocks import ImageChooserBlock from wagtail.images.models import Image @@ -37,6 +36,7 @@ from .blocks.article_index_block import ArticleTileBlock from .blocks.cdh_hosted_video import HostedVideo from .blocks.download_block import DownloadBlock +from .blocks.embed_block import EmbedBlock from .blocks.event_index_block import EventTileBlock from .blocks.feature_block import FeatureBlock from .blocks.image_block import ImageBlock @@ -71,15 +71,13 @@ ALT_TEXT_HELP = """Alternative text for visually impaired users to briefly communicate the intended message of the image in this context.""" -EMBED_HELP = """This should be used for videos from Princeton's Media Central. Copy the "oEmbed URL" from the "Share" menu""" - STANDARD_BLOCKS = [ ("paragraph", RichText()), ("download_block", DownloadBlock()), ("cta_block", CTABlock()), ("accordion_block", AccordionBlock()), ("video_block", Video()), - ("embed", HostedVideo()), + ("cdh_hosted_video", HostedVideo()), ("pull_quote", PullQuote()), ("note", Note()), ("image", ImageBlock()), @@ -90,6 +88,7 @@ ("tile_block", StandardTileBlock()), ("article_tile_block", ArticleTileBlock()), ("event_tile_block", EventTileBlock()), + ("embed", EmbedBlock()), ] @@ -318,6 +317,7 @@ class ContentPage(BasePage, StandardHeroMixin, JumplinksMixin, SidebarNavigation content_panels = StandardHeroMixin.content_panels + [ FieldPanel("body"), + FieldPanel("attachments"), ] search_fields = StandardHeroMixin.search_fields + [index.SearchField("body")] diff --git a/cdhweb/people/migrations/0023_alter_peoplecategorypage_body_alter_profile_body.py b/cdhweb/people/migrations/0023_alter_peoplecategorypage_body_alter_profile_body.py new file mode 100644 index 00000000..5aee50c5 --- /dev/null +++ b/cdhweb/people/migrations/0023_alter_peoplecategorypage_body_alter_profile_body.py @@ -0,0 +1,33 @@ +# Generated by Django 5.0.5 on 2024-07-08 01:42 + +import cdhweb.pages.blocks.download_block +import cdhweb.pages.blocks.embed_block +import cdhweb.pages.blocks.migrated +import cdhweb.pages.blocks.newsletter +import cdhweb.pages.blocks.rich_text +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('people', '0022_alter_peoplecategorypage_attachments_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='peoplecategorypage', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + migrations.AlterField( + model_name='profile', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + ] diff --git a/cdhweb/projects/migrations/0030_alter_project_body.py b/cdhweb/projects/migrations/0030_alter_project_body.py new file mode 100644 index 00000000..3757ff0b --- /dev/null +++ b/cdhweb/projects/migrations/0030_alter_project_body.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.5 on 2024-07-08 01:42 + +import cdhweb.pages.blocks.download_block +import cdhweb.pages.blocks.embed_block +import cdhweb.pages.blocks.migrated +import cdhweb.pages.blocks.newsletter +import cdhweb.pages.blocks.rich_text +import wagtail.blocks +import wagtail.contrib.typed_table_block.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0029_alter_project_attachments'), + ] + + operations = [ + migrations.AlterField( + model_name='project', + name='body', + field=wagtail.fields.StreamField([('paragraph', cdhweb.pages.blocks.rich_text.RichTextBlock()), ('download_block', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(help_text='Heading for document block', max_length=80, required=False)), ('description', wagtail.blocks.TextBlock(help_text='A description to display with the download file (150 characters maximum).', max_length=150, required=False)), ('documents', wagtail.blocks.ListBlock(cdhweb.pages.blocks.download_block.FileBlock, help_text='Upload at least 1 and maximum 10 files. Each file size should be less than 5MB.', max_num=10, min_num=1))])), ('cta_block', wagtail.blocks.StructBlock([('introduction', wagtail.blocks.TextBlock(help_text='Short introduction to the action you want users to take. Ideal: 80 characters or less (Max: 100 characters).', max_length=100, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=1))])), ('accordion_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('description', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], required=False)), ('accordion_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True, verbose_name='Accordion Title')), ('body', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'document-link', 'h3', 'h4'], help_text='Only use H3 if you have not set an overall heading for the accordion block.'))])))])), ('video_block', wagtail.blocks.StructBlock([('video', wagtail.blocks.URLBlock(help_text='A YouTube URL. Link to a specifc video or playlist.')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=False)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False)), ('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False))])), ('cdh_hosted_video', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], required=False)), ('video_url', wagtail.embeds.blocks.EmbedBlock(help_text='This should be used for videos from Princeton\'s Media Central. Copy the "oEmbed URL" from the "Share" menu')), ('accessibility_description', wagtail.blocks.CharBlock(help_text='Use this to describe the video. It is used as an accessibility attribute mainly for screen readers.', required=True)), ('transcript', wagtail.blocks.RichTextBlock(features=['bold', 'link', 'document-link'], required=False))])), ('pull_quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(features=['bold', 'italic'], help_text='Pull a small section of content out as an "aside" to give it emphasis.', max_length=100, required=True)), ('attribution', wagtail.blocks.RichTextBlock(features=['bold', 'link'], help_text='Optional attribution', max_length=60, required=False))])), ('note', wagtail.blocks.StructBlock([('heading', wagtail.blocks.TextBlock(help_text='Optional heading', required=False)), ('message', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ul', 'ol'], help_text='Note message up to 750 chars', max_length=750, required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('caption', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A short caption for the image.', max_length=180, required=False)), ('credit', wagtail.blocks.RichTextBlock(features=['italic', 'bold', 'link'], help_text='A credit line or attribution for the image.', max_length=80, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers', max_length=80, required=False)), ('size', wagtail.blocks.ChoiceBlock(choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')], label='Image Size'))])), ('feature', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True)), ('feature_text', wagtail.blocks.RichTextBlock(features=['bold', 'document-link', 'italic', 'link', 'ol', 'ul'], max_length=400)), ('image', wagtail.images.blocks.ImageChooserBlock(label='Image', required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='Describe the image for screen readers.', max_length=80, required=False)), ('cta_buttons', wagtail.blocks.StreamBlock([('internal_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock()), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))])), ('external_link', wagtail.blocks.StructBlock([('link_url', wagtail.blocks.URLBlock(label='URL')), ('link_text', wagtail.blocks.CharBlock(label='Button text', max_length=40, required=True))]))], max_num=2, min_num=0, required=False))])), ('table', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(help_text='Table caption', label='Caption', required=False)), ('notes', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'document-link'], help_text='Primarily for using for footnotes from cells with asterisks', label='Table notes', required=False)), ('table', wagtail.contrib.typed_table_block.blocks.TypedTableBlock([('rich_text', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'link', 'ol', 'ul', 'h3']))], help_text='It is recommended to use a minimal number of columns, to ensure the table is usable on mobile and desktop.', max_num=1, min_num=1))])), ('newsletter', cdhweb.pages.blocks.newsletter.NewsletterBlock()), ('heading', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))]))])), ('tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('see_more_link', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(help_text='Choose a page to link to', label='Wagtail Page', required=False)), ('title', wagtail.blocks.CharBlock(help_text='Set title for this link', label='Link title', max_length=80, required=False))], help_text="'See more' link", required=False)), ('featured', wagtail.blocks.BooleanBlock(default=False, help_text='Check this checkbox to create a visually distinct tile block that stands out from regular tiles on the page.', required=False)), ('tiles', wagtail.blocks.StreamBlock([('internal_page_tile', wagtail.blocks.StructBlock([('page', wagtail.blocks.PageChooserBlock(required=True))])), ('external_page_tile', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(help_text='Title for this tile.', label='Tile Title', max_length=100, required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(help_text='Image for this tile.', label='Tile Image', required=False)), ('summary', wagtail.blocks.CharBlock(help_text='Summary for this tile.', label='Tile Summary', max_length=200, required=False)), ('external_link', wagtail.blocks.URLBlock(required=True))]))], min_num=1, required=True))])), ('article_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Blog Landing Page whose child pages you want to show as tiles in this block.', page_type=['blog.BlogLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('event_tile_block', wagtail.blocks.StructBlock([('show_in_jumplinks', wagtail.blocks.BooleanBlock(default=False, help_text="Link to this block in the jumplinks list (when 'Show jumplinks' is enabled in Page settings)", required=False)), ('heading', wagtail.blocks.StructBlock([('heading', wagtail.blocks.CharBlock(max_length=80, required=True))], help_text='Heading for this tile block', required=False)), ('description', wagtail.blocks.CharBlock(help_text='Description for this tile block', label='Description', required=False)), ('landing_page', wagtail.blocks.PageChooserBlock(help_text='Select the Event Landing Page whose child pages you want to show as tiles in this block.', page_type=['events.EventsLandingPage'], required=True)), ('max_articles', wagtail.blocks.ChoiceBlock(choices=[(2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6')], help_text='Define the maximum number of tiles to show in this group.', icon='placeholder')), ('see_more_link', wagtail.blocks.CharBlock(default='See All', help_text='Set text for the link which takes you to the landing page', label='Link title', max_length=80, required=False))])), ('embed', cdhweb.pages.blocks.embed_block.EmbedBlock()), ('migrated', cdhweb.pages.blocks.migrated.MigratedBlock())], blank=True, help_text='Put content for the body of the page here. Start with using the + button.', use_json_field=True, verbose_name='Page content'), + ), + ]