From bfedf69f3bee52df144e3b2994081934e4bf5a99 Mon Sep 17 00:00:00 2001 From: Mara Karagianni Date: Thu, 12 Dec 2024 13:43:06 +0100 Subject: [PATCH] update wagtail to 6.3 LTS --- apps/cms/blocks.py | 6 +- .../0005_customimage_description.py | 20 + ...r_homepage_body_streamfield_de_and_more.py | 833 ++++++++++++++++++ apps/cms/pages/models.py | 12 +- changelog/8555.md | 2 + requirements/base.txt | 2 +- 6 files changed, 865 insertions(+), 10 deletions(-) create mode 100644 apps/cms/images/migrations/0005_customimage_description.py create mode 100644 apps/cms/pages/migrations/0011_alter_homepage_body_streamfield_de_and_more.py diff --git a/apps/cms/blocks.py b/apps/cms/blocks.py index ba4689e1a..003fb907c 100644 --- a/apps/cms/blocks.py +++ b/apps/cms/blocks.py @@ -1,6 +1,6 @@ from wagtail import blocks from wagtail.documents.blocks import DocumentChooserBlock -from wagtail.images.blocks import ImageChooserBlock +from wagtail.images.blocks import ImageBlock class CallToActionBlock(blocks.StructBlock): @@ -14,7 +14,7 @@ class Meta: class ImageCTABlock(blocks.StructBlock): - image = ImageChooserBlock(required=False) + image = ImageBlock(required=False) body = blocks.RichTextBlock(required=False) link = blocks.CharBlock(required=False) link_text = blocks.CharBlock(required=False, max_length=50, label="Link Text") @@ -109,7 +109,7 @@ class QuoteBlock(blocks.StructBlock): color = blocks.ChoiceBlock( choices=[("turquoise", "turquoise"), ("blue", "dark blue")], default=1 ) - image = ImageChooserBlock() + image = ImageBlock() quote = blocks.TextBlock() quote_author = blocks.CharBlock(required=False) link = blocks.URLBlock(required=False) diff --git a/apps/cms/images/migrations/0005_customimage_description.py b/apps/cms/images/migrations/0005_customimage_description.py new file mode 100644 index 000000000..be6376731 --- /dev/null +++ b/apps/cms/images/migrations/0005_customimage_description.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.17 on 2024-12-12 12:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("a4_candy_cms_images", "0004_alter_customrendition_file"), + ] + + operations = [ + migrations.AddField( + model_name="customimage", + name="description", + field=models.CharField( + blank=True, default="", max_length=255, verbose_name="description" + ), + ), + ] diff --git a/apps/cms/pages/migrations/0011_alter_homepage_body_streamfield_de_and_more.py b/apps/cms/pages/migrations/0011_alter_homepage_body_streamfield_de_and_more.py new file mode 100644 index 000000000..dd148d6bc --- /dev/null +++ b/apps/cms/pages/migrations/0011_alter_homepage_body_streamfield_de_and_more.py @@ -0,0 +1,833 @@ +# Generated by Django 4.2.17 on 2024-12-12 12:35 + +import apps.cms.blocks +from django.db import migrations +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ("a4_candy_cms_pages", "0010_auto_20220614_1427"), + ] + + operations = [ + migrations.AlterField( + model_name="homepage", + name="body_streamfield_de", + field=wagtail.fields.StreamField( + [ + ("col_list_image_cta_block", 7), + ("background_cta_block", 10), + ("columns_cta", 14), + ("html", 15), + ("paragraph", 16), + ("news", 19), + ("use_cases", 24), + ], + blank=True, + block_lookup={ + 0: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 1: ("wagtail.images.blocks.ImageBlock", [], {}), + 2: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("image", 1), ("body", 2), ("link", 3), ("link_text", 4)]], + {"label": "List and Image"}, + ), + 6: ("wagtail.blocks.ListBlock", (5,), {}), + 7: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 0), ("columns", 6)]], + {}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("body", 2), ("link", 3), ("link_text", 4)]], + {"label": "CTA with Background"}, + ), + 9: ("wagtail.blocks.ListBlock", (8,), {}), + 10: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 0), ("columns", 9)]], + {}, + ), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 12: ( + "wagtail.blocks.StructBlock", + [[("body", 2), ("link", 3), ("link_text", 4)]], + {"label": "CTA Column"}, + ), + 13: ("wagtail.blocks.ListBlock", (12,), {}), + 14: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 11), ("columns", 13)]], + {}, + ), + 15: ("wagtail.blocks.RawHTMLBlock", (), {}), + 16: ("wagtail.blocks.RichTextBlock", (), {}), + 17: ("wagtail.blocks.CharBlock", (), {}), + 18: ( + "wagtail.blocks.PageChooserBlock", + (), + {"page_type": ["a4_candy_cms_news.NewsIndexPage"]}, + ), + 19: ( + "wagtail.blocks.StructBlock", + [[("title", 17), ("news_page", 18)]], + {}, + ), + 20: ( + "wagtail.blocks.PageChooserBlock", + (), + {"page_type": ["a4_candy_cms_use_cases.UseCasePage"]}, + ), + 21: ("wagtail.blocks.ListBlock", (20,), {}), + 22: ("wagtail.blocks.URLBlock", (), {}), + 23: ( + "wagtail.blocks.PageChooserBlock", + (), + {"page_type": ["a4_candy_cms_use_cases.UseCaseIndexPage"]}, + ), + 24: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 17), + ("use_cases", 21), + ("demo_platform", 22), + ("use_case_page", 23), + ] + ], + {}, + ), + }, + ), + ), + migrations.AlterField( + model_name="homepage", + name="body_streamfield_en", + field=wagtail.fields.StreamField( + [ + ("col_list_image_cta_block", 7), + ("background_cta_block", 10), + ("columns_cta", 14), + ("html", 15), + ("paragraph", 16), + ("news", 19), + ("use_cases", 24), + ], + blank=True, + block_lookup={ + 0: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 1: ("wagtail.images.blocks.ImageBlock", [], {}), + 2: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("image", 1), ("body", 2), ("link", 3), ("link_text", 4)]], + {"label": "List and Image"}, + ), + 6: ("wagtail.blocks.ListBlock", (5,), {}), + 7: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 0), ("columns", 6)]], + {}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("body", 2), ("link", 3), ("link_text", 4)]], + {"label": "CTA with Background"}, + ), + 9: ("wagtail.blocks.ListBlock", (8,), {}), + 10: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 0), ("columns", 9)]], + {}, + ), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 12: ( + "wagtail.blocks.StructBlock", + [[("body", 2), ("link", 3), ("link_text", 4)]], + {"label": "CTA Column"}, + ), + 13: ("wagtail.blocks.ListBlock", (12,), {}), + 14: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 11), ("columns", 13)]], + {}, + ), + 15: ("wagtail.blocks.RawHTMLBlock", (), {}), + 16: ("wagtail.blocks.RichTextBlock", (), {}), + 17: ("wagtail.blocks.CharBlock", (), {}), + 18: ( + "wagtail.blocks.PageChooserBlock", + (), + {"page_type": ["a4_candy_cms_news.NewsIndexPage"]}, + ), + 19: ( + "wagtail.blocks.StructBlock", + [[("title", 17), ("news_page", 18)]], + {}, + ), + 20: ( + "wagtail.blocks.PageChooserBlock", + (), + {"page_type": ["a4_candy_cms_use_cases.UseCasePage"]}, + ), + 21: ("wagtail.blocks.ListBlock", (20,), {}), + 22: ("wagtail.blocks.URLBlock", (), {}), + 23: ( + "wagtail.blocks.PageChooserBlock", + (), + {"page_type": ["a4_candy_cms_use_cases.UseCaseIndexPage"]}, + ), + 24: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 17), + ("use_cases", 21), + ("demo_platform", 22), + ("use_case_page", 23), + ] + ], + {}, + ), + }, + ), + ), + migrations.AlterField( + model_name="simplepage", + name="body_streamfield_de", + field=wagtail.fields.StreamField( + [ + ("html", 0), + ("richtext", 1), + ("image", 2), + ("faq", 5), + ("image_cta", 8), + ("col_list_image_cta_block", 12), + ("columns_cta", 16), + ("downloads", 18), + ("quote", 22), + ], + block_lookup={ + 0: ("wagtail.blocks.RawHTMLBlock", (), {}), + 1: ("wagtail.blocks.RichTextBlock", (), {}), + 2: ("wagtail.images.blocks.ImageBlock", [], {}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.AccordeonBlock,), + {}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("entries", 4)]], + {}, + ), + 6: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 7: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {}, + ), + 9: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 10: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "List and Image"}, + ), + 11: ("wagtail.blocks.ListBlock", (10,), {}), + 12: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 9), ("columns", 11)]], + {}, + ), + 13: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 14: ( + "wagtail.blocks.StructBlock", + [[("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "CTA Column"}, + ), + 15: ("wagtail.blocks.ListBlock", (14,), {}), + 16: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 13), ("columns", 15)]], + {}, + ), + 17: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.DownloadBlock,), + {}, + ), + 18: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("documents", 17)]], + {}, + ), + 19: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("turquoise", "turquoise"), + ("blue", "dark blue"), + ] + }, + ), + 20: ("wagtail.blocks.TextBlock", (), {}), + 21: ("wagtail.blocks.URLBlock", (), {"required": False}), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("color", 19), + ("image", 2), + ("quote", 20), + ("quote_author", 3), + ("link", 21), + ("link_text", 7), + ] + ], + {}, + ), + }, + ), + ), + migrations.AlterField( + model_name="simplepage", + name="body_streamfield_en", + field=wagtail.fields.StreamField( + [ + ("html", 0), + ("richtext", 1), + ("image", 2), + ("faq", 5), + ("image_cta", 8), + ("col_list_image_cta_block", 12), + ("columns_cta", 16), + ("downloads", 18), + ("quote", 22), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RawHTMLBlock", (), {}), + 1: ("wagtail.blocks.RichTextBlock", (), {}), + 2: ("wagtail.images.blocks.ImageBlock", [], {}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.AccordeonBlock,), + {}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("entries", 4)]], + {}, + ), + 6: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 7: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {}, + ), + 9: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 10: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "List and Image"}, + ), + 11: ("wagtail.blocks.ListBlock", (10,), {}), + 12: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 9), ("columns", 11)]], + {}, + ), + 13: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 14: ( + "wagtail.blocks.StructBlock", + [[("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "CTA Column"}, + ), + 15: ("wagtail.blocks.ListBlock", (14,), {}), + 16: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 13), ("columns", 15)]], + {}, + ), + 17: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.DownloadBlock,), + {}, + ), + 18: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("documents", 17)]], + {}, + ), + 19: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("turquoise", "turquoise"), + ("blue", "dark blue"), + ] + }, + ), + 20: ("wagtail.blocks.TextBlock", (), {}), + 21: ("wagtail.blocks.URLBlock", (), {"required": False}), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("color", 19), + ("image", 2), + ("quote", 20), + ("quote_author", 3), + ("link", 21), + ("link_text", 7), + ] + ], + {}, + ), + }, + ), + ), + migrations.AlterField( + model_name="simplepage", + name="body_streamfield_ky", + field=wagtail.fields.StreamField( + [ + ("html", 0), + ("richtext", 1), + ("image", 2), + ("faq", 5), + ("image_cta", 8), + ("col_list_image_cta_block", 12), + ("columns_cta", 16), + ("downloads", 18), + ("quote", 22), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RawHTMLBlock", (), {}), + 1: ("wagtail.blocks.RichTextBlock", (), {}), + 2: ("wagtail.images.blocks.ImageBlock", [], {}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.AccordeonBlock,), + {}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("entries", 4)]], + {}, + ), + 6: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 7: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {}, + ), + 9: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 10: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "List and Image"}, + ), + 11: ("wagtail.blocks.ListBlock", (10,), {}), + 12: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 9), ("columns", 11)]], + {}, + ), + 13: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 14: ( + "wagtail.blocks.StructBlock", + [[("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "CTA Column"}, + ), + 15: ("wagtail.blocks.ListBlock", (14,), {}), + 16: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 13), ("columns", 15)]], + {}, + ), + 17: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.DownloadBlock,), + {}, + ), + 18: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("documents", 17)]], + {}, + ), + 19: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("turquoise", "turquoise"), + ("blue", "dark blue"), + ] + }, + ), + 20: ("wagtail.blocks.TextBlock", (), {}), + 21: ("wagtail.blocks.URLBlock", (), {"required": False}), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("color", 19), + ("image", 2), + ("quote", 20), + ("quote_author", 3), + ("link", 21), + ("link_text", 7), + ] + ], + {}, + ), + }, + ), + ), + migrations.AlterField( + model_name="simplepage", + name="body_streamfield_nl", + field=wagtail.fields.StreamField( + [ + ("html", 0), + ("richtext", 1), + ("image", 2), + ("faq", 5), + ("image_cta", 8), + ("col_list_image_cta_block", 12), + ("columns_cta", 16), + ("downloads", 18), + ("quote", 22), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RawHTMLBlock", (), {}), + 1: ("wagtail.blocks.RichTextBlock", (), {}), + 2: ("wagtail.images.blocks.ImageBlock", [], {}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.AccordeonBlock,), + {}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("entries", 4)]], + {}, + ), + 6: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 7: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {}, + ), + 9: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 10: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "List and Image"}, + ), + 11: ("wagtail.blocks.ListBlock", (10,), {}), + 12: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 9), ("columns", 11)]], + {}, + ), + 13: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 14: ( + "wagtail.blocks.StructBlock", + [[("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "CTA Column"}, + ), + 15: ("wagtail.blocks.ListBlock", (14,), {}), + 16: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 13), ("columns", 15)]], + {}, + ), + 17: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.DownloadBlock,), + {}, + ), + 18: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("documents", 17)]], + {}, + ), + 19: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("turquoise", "turquoise"), + ("blue", "dark blue"), + ] + }, + ), + 20: ("wagtail.blocks.TextBlock", (), {}), + 21: ("wagtail.blocks.URLBlock", (), {"required": False}), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("color", 19), + ("image", 2), + ("quote", 20), + ("quote_author", 3), + ("link", 21), + ("link_text", 7), + ] + ], + {}, + ), + }, + ), + ), + migrations.AlterField( + model_name="simplepage", + name="body_streamfield_ru", + field=wagtail.fields.StreamField( + [ + ("html", 0), + ("richtext", 1), + ("image", 2), + ("faq", 5), + ("image_cta", 8), + ("col_list_image_cta_block", 12), + ("columns_cta", 16), + ("downloads", 18), + ("quote", 22), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RawHTMLBlock", (), {}), + 1: ("wagtail.blocks.RichTextBlock", (), {}), + 2: ("wagtail.images.blocks.ImageBlock", [], {}), + 3: ("wagtail.blocks.CharBlock", (), {"required": False}), + 4: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.AccordeonBlock,), + {}, + ), + 5: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("entries", 4)]], + {}, + ), + 6: ("wagtail.blocks.RichTextBlock", (), {"required": False}), + 7: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Link Text", "max_length": 50, "required": False}, + ), + 8: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {}, + ), + 9: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [(1, "One column"), (2, "Two columns")]}, + ), + 10: ( + "wagtail.blocks.StructBlock", + [[("image", 2), ("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "List and Image"}, + ), + 11: ("wagtail.blocks.ListBlock", (10,), {}), + 12: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 9), ("columns", 11)]], + {}, + ), + 13: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + (1, "One column"), + (2, "Two columns"), + (3, "Three columns"), + ] + }, + ), + 14: ( + "wagtail.blocks.StructBlock", + [[("body", 6), ("link", 3), ("link_text", 7)]], + {"label": "CTA Column"}, + ), + 15: ("wagtail.blocks.ListBlock", (14,), {}), + 16: ( + "wagtail.blocks.StructBlock", + [[("columns_count", 13), ("columns", 15)]], + {}, + ), + 17: ( + "wagtail.blocks.ListBlock", + (apps.cms.blocks.DownloadBlock,), + {}, + ), + 18: ( + "wagtail.blocks.StructBlock", + [[("title", 3), ("documents", 17)]], + {}, + ), + 19: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("turquoise", "turquoise"), + ("blue", "dark blue"), + ] + }, + ), + 20: ("wagtail.blocks.TextBlock", (), {}), + 21: ("wagtail.blocks.URLBlock", (), {"required": False}), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("color", 19), + ("image", 2), + ("quote", 20), + ("quote_author", 3), + ("link", 21), + ("link_text", 7), + ] + ], + {}, + ), + }, + ), + ), + ] diff --git a/apps/cms/pages/models.py b/apps/cms/pages/models.py index 9306481c4..241c5959b 100644 --- a/apps/cms/pages/models.py +++ b/apps/cms/pages/models.py @@ -10,7 +10,7 @@ from wagtail.admin.panels import PageChooserPanel from wagtail.admin.panels import TabbedInterface from wagtail.admin.panels import TitleFieldPanel -from wagtail.images.blocks import ImageChooserBlock +from wagtail.images.blocks import ImageBlock from wagtail.models import Page from apps.cms import blocks as cms_blocks @@ -199,7 +199,7 @@ class SimplePage(Page): [ ("html", blocks.RawHTMLBlock()), ("richtext", blocks.RichTextBlock()), - ("image", ImageChooserBlock()), + ("image", ImageBlock()), ("faq", cms_blocks.AccordeonListBlock()), ("image_cta", cms_blocks.ImageCTABlock()), ("col_list_image_cta_block", cms_blocks.ColumnsImageCTABlock()), @@ -212,7 +212,7 @@ class SimplePage(Page): [ ("html", blocks.RawHTMLBlock()), ("richtext", blocks.RichTextBlock()), - ("image", ImageChooserBlock()), + ("image", ImageBlock()), ("faq", cms_blocks.AccordeonListBlock()), ("image_cta", cms_blocks.ImageCTABlock()), ("col_list_image_cta_block", cms_blocks.ColumnsImageCTABlock()), @@ -227,7 +227,7 @@ class SimplePage(Page): [ ("html", blocks.RawHTMLBlock()), ("richtext", blocks.RichTextBlock()), - ("image", ImageChooserBlock()), + ("image", ImageBlock()), ("faq", cms_blocks.AccordeonListBlock()), ("image_cta", cms_blocks.ImageCTABlock()), ("col_list_image_cta_block", cms_blocks.ColumnsImageCTABlock()), @@ -242,7 +242,7 @@ class SimplePage(Page): [ ("html", blocks.RawHTMLBlock()), ("richtext", blocks.RichTextBlock()), - ("image", ImageChooserBlock()), + ("image", ImageBlock()), ("faq", cms_blocks.AccordeonListBlock()), ("image_cta", cms_blocks.ImageCTABlock()), ("col_list_image_cta_block", cms_blocks.ColumnsImageCTABlock()), @@ -257,7 +257,7 @@ class SimplePage(Page): [ ("html", blocks.RawHTMLBlock()), ("richtext", blocks.RichTextBlock()), - ("image", ImageChooserBlock()), + ("image", ImageBlock()), ("faq", cms_blocks.AccordeonListBlock()), ("image_cta", cms_blocks.ImageCTABlock()), ("col_list_image_cta_block", cms_blocks.ColumnsImageCTABlock()), diff --git a/changelog/8555.md b/changelog/8555.md index f1b2791b8..592f41b51 100644 --- a/changelog/8555.md +++ b/changelog/8555.md @@ -3,6 +3,8 @@ - update wagtail to 6.0.x - update wagtail to 6.1.x - update wagtail to 6.2.x +- update wagtail to 6.3 LTS + - replace ImageChooserBlock with ImageBlock for pages and blocks ### Removed diff --git a/requirements/base.txt b/requirements/base.txt index 0063698f3..b0990d6d1 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,7 +8,7 @@ django_csp==3.8 django-parler==2.3 djangorestframework-simplejwt==5.3.1 sentry-sdk==2.19.2 -wagtail==6.2 +wagtail==6.3 whitenoise==6.8.2 xmltodict==0.14.2 zeep==4.3.1