From 1b620a117eb7b8a89e7df0196896426552d17e7e Mon Sep 17 00:00:00 2001 From: Julian Dehm Date: Tue, 14 Jun 2022 14:33:41 +0200 Subject: [PATCH] upgrade to wagtail 3 --- adhocracy-plus/config/settings/base.py | 2 +- adhocracy-plus/config/settings/dev.py | 2 +- adhocracy-plus/config/urls.py | 2 +- apps/actions/blocks.py | 2 +- apps/cms/blocks.py | 2 +- apps/cms/contacts/migrations/0001_initial.py | 6 +- .../migrations/0003_auto_20220614_1427.py | 40 +++++++++++++ apps/cms/contacts/models.py | 15 +++-- apps/cms/images/migrations/0001_initial.py | 4 +- .../0002_alter_customimage_file_hash.py | 18 ++++++ apps/cms/news/blocks.py | 2 +- apps/cms/news/migrations/0001_initial.py | 8 +-- .../migrations/0002_auto_20220614_1427.py | 25 +++++++++ apps/cms/news/models.py | 24 ++++---- apps/cms/pages/migrations/0001_initial.py | 20 +++---- apps/cms/pages/migrations/0002_add_blocks.py | 8 +-- .../0003_add_img_col_block_update_name.py | 12 ++-- .../migrations/0004_auto_20191112_1354.py | 12 ++-- ...z_and_russianand_dutch_language_choices.py | 10 ++-- .../0009_limit_char_elements_hero_fields.py | 6 +- .../migrations/0010_auto_20220614_1427.py | 52 +++++++++++++++++ apps/cms/pages/models.py | 56 +++++++++---------- apps/cms/settings/helpers.py | 2 +- apps/cms/settings/migrations/0001_initial.py | 6 +- ...006_add_helptexts_to_organisation_pages.py | 6 +- apps/cms/settings/models.py | 9 ++- apps/cms/use_cases/blocks.py | 2 +- apps/cms/use_cases/migrations/0001_initial.py | 8 +-- .../migrations/0003_auto_20220614_1427.py | 25 +++++++++ apps/cms/use_cases/models.py | 26 ++++----- apps/contrib/translations.py | 2 +- requirements/base.txt | 2 +- 32 files changed, 284 insertions(+), 132 deletions(-) create mode 100644 apps/cms/contacts/migrations/0003_auto_20220614_1427.py create mode 100644 apps/cms/images/migrations/0002_alter_customimage_file_hash.py create mode 100644 apps/cms/news/migrations/0002_auto_20220614_1427.py create mode 100644 apps/cms/pages/migrations/0010_auto_20220614_1427.py create mode 100644 apps/cms/use_cases/migrations/0003_auto_20220614_1427.py diff --git a/adhocracy-plus/config/settings/base.py b/adhocracy-plus/config/settings/base.py index d6f95dd04..c1d827859 100644 --- a/adhocracy-plus/config/settings/base.py +++ b/adhocracy-plus/config/settings/base.py @@ -55,7 +55,7 @@ 'wagtail.images', 'wagtail.search', 'wagtail.admin', - 'wagtail.core', + 'wagtail', 'modelcluster', 'taggit', 'apps.cms.pages', diff --git a/adhocracy-plus/config/settings/dev.py b/adhocracy-plus/config/settings/dev.py index f210f02f4..d155dfa87 100644 --- a/adhocracy-plus/config/settings/dev.py +++ b/adhocracy-plus/config/settings/dev.py @@ -36,7 +36,7 @@ pass -BASE_URL = 'http://localhost:8004' +WAGTAILADMIN_BASE_URL = 'http://localhost:8004' CAPTCHA_URL = 'https://captcheck.netsyms.com/api.php' SITE_ID = 1 diff --git a/adhocracy-plus/config/urls.py b/adhocracy-plus/config/urls.py index 93963604e..caabb5462 100644 --- a/adhocracy-plus/config/urls.py +++ b/adhocracy-plus/config/urls.py @@ -154,5 +154,5 @@ # generic patterns at the very end urlpatterns += [ re_path(r'', include('apps.organisations.urls')), - re_path(r'', include('wagtail.core.urls')), + re_path(r'', include('wagtail.urls')), ] diff --git a/apps/actions/blocks.py b/apps/actions/blocks.py index 793c75dfa..a1838a0b0 100644 --- a/apps/actions/blocks.py +++ b/apps/actions/blocks.py @@ -1,5 +1,5 @@ from django.utils.translation import gettext_lazy as _ -from wagtail.core import blocks +from wagtail import blocks from adhocracy4.actions.models import Action diff --git a/apps/cms/blocks.py b/apps/cms/blocks.py index 7fa66379b..fa2fb471e 100644 --- a/apps/cms/blocks.py +++ b/apps/cms/blocks.py @@ -1,4 +1,4 @@ -from wagtail.core import blocks +from wagtail import blocks from wagtail.documents.blocks import DocumentChooserBlock from wagtail.images.blocks import ImageChooserBlock diff --git a/apps/cms/contacts/migrations/0001_initial.py b/apps/cms/contacts/migrations/0001_initial.py index eaf39dcd9..e4a205556 100644 --- a/apps/cms/contacts/migrations/0001_initial.py +++ b/apps/cms/contacts/migrations/0001_initial.py @@ -3,7 +3,7 @@ from django.db import migrations, models import django.db.models.deletion import modelcluster.fields -import wagtail.core.fields +import wagtail.fields class Migration(migrations.Migration): @@ -25,8 +25,8 @@ class Migration(migrations.Migration): ('subject', models.CharField(blank=True, max_length=255, verbose_name='subject')), ('header_de', models.CharField(blank=True, max_length=500, verbose_name='Header')), ('header_en', models.CharField(blank=True, max_length=500, verbose_name='Header')), - ('intro_en', wagtail.core.fields.RichTextField(blank=True)), - ('intro_de', wagtail.core.fields.RichTextField(blank=True)), + ('intro_en', wagtail.fields.RichTextField(blank=True)), + ('intro_de', wagtail.fields.RichTextField(blank=True)), ('thank_you_text_en', models.TextField(blank=True)), ('thank_you_text_de', models.TextField(blank=True)), ('contact_person_name', models.CharField(blank=True, max_length=100)), diff --git a/apps/cms/contacts/migrations/0003_auto_20220614_1427.py b/apps/cms/contacts/migrations/0003_auto_20220614_1427.py new file mode 100644 index 000000000..dd9203818 --- /dev/null +++ b/apps/cms/contacts/migrations/0003_auto_20220614_1427.py @@ -0,0 +1,40 @@ +# Generated by Django 3.2.13 on 2022-06-14 12:27 + +import django.core.serializers.json +from django.db import migrations, models +import wagtail.contrib.forms.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('a4_candy_cms_contacts', '0002_new_wagtail_fields'), + ] + + operations = [ + migrations.AlterField( + model_name='customformsubmission', + name='form_data', + field=models.JSONField(encoder=django.core.serializers.json.DjangoJSONEncoder), + ), + migrations.AlterField( + model_name='formfield', + name='choices', + field=models.TextField(blank=True, help_text='Comma or new line separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='choices'), + ), + migrations.AlterField( + model_name='formfield', + name='default_value', + field=models.TextField(blank=True, help_text='Default value. Comma or new line separated values supported for checkboxes.', verbose_name='default value'), + ), + migrations.AlterField( + model_name='formpage', + name='from_address', + field=models.EmailField(blank=True, max_length=255, verbose_name='from address'), + ), + migrations.AlterField( + model_name='formpage', + name='to_address', + field=models.CharField(blank=True, help_text='Optional - form submissions will be emailed to these addresses. Separate multiple addresses by comma.', max_length=255, validators=[wagtail.contrib.forms.models.validate_to_address], verbose_name='to address'), + ), + ] diff --git a/apps/cms/contacts/models.py b/apps/cms/contacts/models.py index 574dbe22e..77646cfaf 100644 --- a/apps/cms/contacts/models.py +++ b/apps/cms/contacts/models.py @@ -6,17 +6,16 @@ from django.shortcuts import redirect from django.utils.translation import gettext_lazy as _ from modelcluster.fields import ParentalKey -from wagtail.admin.edit_handlers import FieldPanel -from wagtail.admin.edit_handlers import FieldRowPanel -from wagtail.admin.edit_handlers import MultiFieldPanel -from wagtail.admin.edit_handlers import ObjectList -from wagtail.admin.edit_handlers import TabbedInterface +from wagtail.admin.panels import FieldPanel +from wagtail.admin.panels import FieldRowPanel +from wagtail.admin.panels import MultiFieldPanel +from wagtail.admin.panels import ObjectList +from wagtail.admin.panels import TabbedInterface from wagtail.contrib.forms.forms import FormBuilder from wagtail.contrib.forms.models import AbstractEmailForm from wagtail.contrib.forms.models import AbstractFormField from wagtail.contrib.forms.models import AbstractFormSubmission -from wagtail.core.fields import RichTextField -from wagtail.images.edit_handlers import ImageChooserPanel +from wagtail.fields import RichTextField from apps.captcha.fields import CaptcheckCaptchaField from apps.cms.emails import AnswerToContactFormEmail @@ -200,7 +199,7 @@ def get_form_fields(self): MultiFieldPanel([ FieldRowPanel([ FieldPanel('contact_person_name', classname="col6"), - ImageChooserPanel('contact_person_image', classname="col6"), + FieldPanel('contact_person_image', classname="col6"), ]), ], "Contact Person"), diff --git a/apps/cms/images/migrations/0001_initial.py b/apps/cms/images/migrations/0001_initial.py index 4aed68769..b53646327 100644 --- a/apps/cms/images/migrations/0001_initial.py +++ b/apps/cms/images/migrations/0001_initial.py @@ -4,7 +4,7 @@ from django.db import migrations, models import django.db.models.deletion import taggit.managers -import wagtail.core.models +import wagtail.models import wagtail.images.models import wagtail.search.index @@ -37,7 +37,7 @@ class Migration(migrations.Migration): ('file_hash', models.CharField(blank=True, editable=False, max_length=40)), ('caption_en', models.CharField(blank=True, max_length=255)), ('caption_de', models.CharField(blank=True, max_length=255)), - ('collection', models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection')), + ('collection', models.ForeignKey(default=wagtail.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection')), ('tags', taggit.managers.TaggableManager(blank=True, help_text=None, through='taggit.TaggedItem', to='taggit.Tag', verbose_name='tags')), ('uploaded_by_user', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='uploaded by user')), ], diff --git a/apps/cms/images/migrations/0002_alter_customimage_file_hash.py b/apps/cms/images/migrations/0002_alter_customimage_file_hash.py new file mode 100644 index 000000000..93916d78f --- /dev/null +++ b/apps/cms/images/migrations/0002_alter_customimage_file_hash.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.13 on 2022-06-14 12:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('a4_candy_cms_images', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='customimage', + name='file_hash', + field=models.CharField(blank=True, db_index=True, editable=False, max_length=40), + ), + ] diff --git a/apps/cms/news/blocks.py b/apps/cms/news/blocks.py index b1c649146..067177d61 100644 --- a/apps/cms/news/blocks.py +++ b/apps/cms/news/blocks.py @@ -1,4 +1,4 @@ -from wagtail.core import blocks +from wagtail import blocks class NewsBlock(blocks.StructBlock): diff --git a/apps/cms/news/migrations/0001_initial.py b/apps/cms/news/migrations/0001_initial.py index 4124977d5..942aa88a0 100644 --- a/apps/cms/news/migrations/0001_initial.py +++ b/apps/cms/news/migrations/0001_initial.py @@ -2,8 +2,8 @@ from django.db import migrations, models import django.db.models.deletion -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -39,8 +39,8 @@ class Migration(migrations.Migration): ('author', models.CharField(blank=True, max_length=255, verbose_name='Author Name')), ('create_date', models.DateTimeField(auto_now_add=True)), ('update_date', models.DateTimeField(auto_now=True)), - ('body_streamfield_de', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('html', wagtail.core.blocks.RawHTMLBlock())], blank=True)), - ('body_streamfield_en', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('html', wagtail.core.blocks.RawHTMLBlock())], blank=True)), + ('body_streamfield_de', wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock())], blank=True)), + ('body_streamfield_en', wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock())], blank=True)), ('image', models.ForeignKey(blank=True, help_text='The Image that is shown on the news item page and the news index page', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='a4_candy_cms_images.CustomImage', verbose_name='News Header Image')), ], options={ diff --git a/apps/cms/news/migrations/0002_auto_20220614_1427.py b/apps/cms/news/migrations/0002_auto_20220614_1427.py new file mode 100644 index 000000000..69e9dd6ed --- /dev/null +++ b/apps/cms/news/migrations/0002_auto_20220614_1427.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.13 on 2022-06-14 12:27 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('a4_candy_cms_news', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='newspage', + name='body_streamfield_de', + field=wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='newspage', + name='body_streamfield_en', + field=wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/apps/cms/news/models.py b/apps/cms/news/models.py index c05bce4f2..85eef07a4 100644 --- a/apps/cms/news/models.py +++ b/apps/cms/news/models.py @@ -2,14 +2,12 @@ from django.core.paginator import Paginator from django.db import models from django.http import Http404 -from wagtail.admin.edit_handlers import FieldPanel -from wagtail.admin.edit_handlers import ObjectList -from wagtail.admin.edit_handlers import StreamFieldPanel -from wagtail.admin.edit_handlers import TabbedInterface -from wagtail.core import blocks -from wagtail.core import fields -from wagtail.core.models import Page -from wagtail.images.edit_handlers import ImageChooserPanel +from wagtail import blocks +from wagtail import fields +from wagtail.admin.panels import FieldPanel +from wagtail.admin.panels import ObjectList +from wagtail.admin.panels import TabbedInterface +from wagtail.models import Page from apps.contrib.translations import TranslatedField @@ -97,12 +95,12 @@ class NewsPage(Page): body_streamfield_de = fields.StreamField([ ('paragraph', blocks.RichTextBlock()), ('html', blocks.RawHTMLBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield_en = fields.StreamField([ ('paragraph', blocks.RichTextBlock()), ('html', blocks.RawHTMLBlock()) - ], blank=True) + ], use_json_field=True, blank=True) subtitle = TranslatedField( 'title_de', @@ -122,18 +120,18 @@ class NewsPage(Page): en_content_panels = [ FieldPanel('title_en'), FieldPanel('teaser_en'), - StreamFieldPanel('body_streamfield_en') + FieldPanel('body_streamfield_en') ] de_content_panels = [ FieldPanel('title_de'), FieldPanel('teaser_de'), - StreamFieldPanel('body_streamfield_de') + FieldPanel('body_streamfield_de') ] common_panels = [ FieldPanel('title'), - ImageChooserPanel('image'), + FieldPanel('image'), FieldPanel('author'), FieldPanel('slug') ] diff --git a/apps/cms/pages/migrations/0001_initial.py b/apps/cms/pages/migrations/0001_initial.py index 8ba6739a9..4958dcd7e 100644 --- a/apps/cms/pages/migrations/0001_initial.py +++ b/apps/cms/pages/migrations/0001_initial.py @@ -2,8 +2,8 @@ from django.db import migrations, models import django.db.models.deletion -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -32,8 +32,8 @@ class Migration(migrations.Migration): name='SimplePage', fields=[ ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('body_de', wagtail.core.fields.RichTextField()), - ('body_en', wagtail.core.fields.RichTextField(blank=True)), + ('body_de', wagtail.fields.RichTextField()), + ('body_en', wagtail.fields.RichTextField(blank=True)), ], options={ 'abstract': False, @@ -46,12 +46,12 @@ class Migration(migrations.Migration): ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), ('subtitle_de', models.CharField(blank=True, max_length=500, verbose_name='Subtitle')), ('subtitle_en', models.CharField(blank=True, max_length=500, verbose_name='Subtitle')), - ('teaser_de', wagtail.core.fields.RichTextField(blank=True)), - ('teaser_en', wagtail.core.fields.RichTextField(blank=True)), - ('body_de', wagtail.core.fields.RichTextField(blank=True)), - ('body_en', wagtail.core.fields.RichTextField(blank=True)), - ('body_streamfield_de', wagtail.core.fields.StreamField([('image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.core.blocks.RawHTMLBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('news', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('news_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('use_cases', wagtail.core.blocks.ListBlock(wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.core.blocks.URLBlock()), ('use_case_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True)), - ('body_streamfield_en', wagtail.core.fields.StreamField([('image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.core.blocks.RawHTMLBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('news', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('news_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('use_cases', wagtail.core.blocks.ListBlock(wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.core.blocks.URLBlock()), ('use_case_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True)), + ('teaser_de', wagtail.fields.RichTextField(blank=True)), + ('teaser_en', wagtail.fields.RichTextField(blank=True)), + ('body_de', wagtail.fields.RichTextField(blank=True)), + ('body_en', wagtail.fields.RichTextField(blank=True)), + ('body_streamfield_de', wagtail.fields.StreamField([('image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True)), + ('body_streamfield_en', wagtail.fields.StreamField([('image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True)), ('form_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='a4_candy_cms_contacts.FormPage')), ('image', models.ForeignKey(blank=True, help_text='The Image that is shown on top of the page', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='a4_candy_cms_images.CustomImage', verbose_name='Header Image')), ], diff --git a/apps/cms/pages/migrations/0002_add_blocks.py b/apps/cms/pages/migrations/0002_add_blocks.py index bc9809603..abbf6ccb0 100644 --- a/apps/cms/pages/migrations/0002_add_blocks.py +++ b/apps/cms/pages/migrations/0002_add_blocks.py @@ -2,8 +2,8 @@ import apps.cms.blocks from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -25,12 +25,12 @@ class Migration(migrations.Migration): migrations.AddField( model_name='simplepage', name='body_streamfield_de', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], default=''), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], default=''), preserve_default=False, ), migrations.AddField( model_name='simplepage', name='body_streamfield_en', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), ), ] diff --git a/apps/cms/pages/migrations/0003_add_img_col_block_update_name.py b/apps/cms/pages/migrations/0003_add_img_col_block_update_name.py index 48b3d5111..cd60f13ad 100644 --- a/apps/cms/pages/migrations/0003_add_img_col_block_update_name.py +++ b/apps/cms/pages/migrations/0003_add_img_col_block_update_name.py @@ -2,8 +2,8 @@ import apps.cms.blocks from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -17,21 +17,21 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='body_streamfield_de', - field=wagtail.core.fields.StreamField([('columns_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.core.blocks.RawHTMLBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('news', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('news_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('use_cases', wagtail.core.blocks.ListBlock(wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.core.blocks.URLBlock()), ('use_case_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), + field=wagtail.fields.StreamField([('columns_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), ), migrations.AlterField( model_name='homepage', name='body_streamfield_en', - field=wagtail.core.fields.StreamField([('columns_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.core.blocks.RawHTMLBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('news', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('news_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('use_cases', wagtail.core.blocks.ListBlock(wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.core.blocks.URLBlock()), ('use_case_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), + field=wagtail.fields.StreamField([('columns_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), ), migrations.AlterField( model_name='simplepage', name='body_streamfield_de', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))]), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))]), ), migrations.AlterField( model_name='simplepage', name='body_streamfield_en', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('columns_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), ), ] diff --git a/apps/cms/pages/migrations/0004_auto_20191112_1354.py b/apps/cms/pages/migrations/0004_auto_20191112_1354.py index fbe213356..fba74f8ea 100644 --- a/apps/cms/pages/migrations/0004_auto_20191112_1354.py +++ b/apps/cms/pages/migrations/0004_auto_20191112_1354.py @@ -2,8 +2,8 @@ import apps.cms.blocks from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -17,21 +17,21 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='body_streamfield_de', - field=wagtail.core.fields.StreamField([('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.core.blocks.RawHTMLBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('news', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('news_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('use_cases', wagtail.core.blocks.ListBlock(wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.core.blocks.URLBlock()), ('use_case_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), + field=wagtail.fields.StreamField([('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), ), migrations.AlterField( model_name='homepage', name='body_streamfield_en', - field=wagtail.core.fields.StreamField([('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.core.blocks.RawHTMLBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('news', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('news_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('use_cases', wagtail.core.blocks.ListBlock(wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.core.blocks.URLBlock()), ('use_case_page', wagtail.core.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), + field=wagtail.fields.StreamField([('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True), ), migrations.AlterField( model_name='simplepage', name='body_streamfield_de', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))]), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))]), ), migrations.AlterField( model_name='simplepage', name='body_streamfield_en', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), ), ] diff --git a/apps/cms/pages/migrations/0007_add_kyrgyz_and_russianand_dutch_language_choices.py b/apps/cms/pages/migrations/0007_add_kyrgyz_and_russianand_dutch_language_choices.py index 6b0f5ff93..86093a82a 100644 --- a/apps/cms/pages/migrations/0007_add_kyrgyz_and_russianand_dutch_language_choices.py +++ b/apps/cms/pages/migrations/0007_add_kyrgyz_and_russianand_dutch_language_choices.py @@ -2,8 +2,8 @@ import apps.cms.blocks from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -17,16 +17,16 @@ class Migration(migrations.Migration): migrations.AddField( model_name='simplepage', name='body_streamfield_ky', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), ), migrations.AddField( model_name='simplepage', name='body_streamfield_nl', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), ), migrations.AddField( model_name='simplepage', name='body_streamfield_ru', - field=wagtail.core.fields.StreamField([('html', wagtail.core.blocks.RawHTMLBlock()), ('richtext', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('entries', wagtail.core.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.core.blocks.StructBlock([('columns_count', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(required=False)), ('documents', wagtail.core.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.core.blocks.StructBlock([('color', wagtail.core.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.core.blocks.TextBlock()), ('quote_author', wagtail.core.blocks.CharBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True), ), ] diff --git a/apps/cms/pages/migrations/0009_limit_char_elements_hero_fields.py b/apps/cms/pages/migrations/0009_limit_char_elements_hero_fields.py index 31dac3c1d..a3e7fee4b 100644 --- a/apps/cms/pages/migrations/0009_limit_char_elements_hero_fields.py +++ b/apps/cms/pages/migrations/0009_limit_char_elements_hero_fields.py @@ -1,7 +1,7 @@ # Generated by Django 2.2.22 on 2021-05-12 07:45 from django.db import migrations, models -import wagtail.core.fields +import wagtail.fields class Migration(migrations.Migration): @@ -14,12 +14,12 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='hero_subtitle_de', - field=wagtail.core.fields.RichTextField(blank=True, max_length=150), + field=wagtail.fields.RichTextField(blank=True, max_length=150), ), migrations.AlterField( model_name='homepage', name='hero_subtitle_en', - field=wagtail.core.fields.RichTextField(blank=True, max_length=150), + field=wagtail.fields.RichTextField(blank=True, max_length=150), ), migrations.AlterField( model_name='homepage', diff --git a/apps/cms/pages/migrations/0010_auto_20220614_1427.py b/apps/cms/pages/migrations/0010_auto_20220614_1427.py new file mode 100644 index 000000000..f55d990cd --- /dev/null +++ b/apps/cms/pages/migrations/0010_auto_20220614_1427.py @@ -0,0 +1,52 @@ +# Generated by Django 3.2.13 on 2022-06-14 12:27 + +import apps.cms.blocks +from django.db import migrations +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('a4_candy_cms_pages', '0009_limit_char_elements_hero_fields'), + ] + + operations = [ + migrations.AlterField( + model_name='homepage', + name='body_streamfield_de', + field=wagtail.fields.StreamField([('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='body_streamfield_en', + field=wagtail.fields.StreamField([('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('background_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA with Background')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('html', wagtail.blocks.RawHTMLBlock()), ('paragraph', wagtail.blocks.RichTextBlock()), ('news', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('news_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_news.NewsIndexPage']))])), ('use_cases', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('use_cases', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCasePage']))), ('demo_platform', wagtail.blocks.URLBlock()), ('use_case_page', wagtail.blocks.PageChooserBlock(page_type=['a4_candy_cms_use_cases.UseCaseIndexPage']))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='simplepage', + name='body_streamfield_de', + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], use_json_field=True), + ), + migrations.AlterField( + model_name='simplepage', + name='body_streamfield_en', + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='simplepage', + name='body_streamfield_ky', + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='simplepage', + name='body_streamfield_nl', + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='simplepage', + name='body_streamfield_ru', + field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock()), ('richtext', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('faq', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('entries', wagtail.blocks.ListBlock(apps.cms.blocks.AccordeonBlock))])), ('image_cta', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))])), ('col_list_image_cta_block', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='List and Image')))])), ('columns_cta', wagtail.blocks.StructBlock([('columns_count', wagtail.blocks.ChoiceBlock(choices=[(1, 'One column'), (2, 'Two columns'), (3, 'Three columns')])), ('columns', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))])), ('downloads', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=False)), ('documents', wagtail.blocks.ListBlock(apps.cms.blocks.DownloadBlock))])), ('quote', wagtail.blocks.StructBlock([('color', wagtail.blocks.ChoiceBlock(choices=[('turquoise', 'turquoise'), ('blue', 'dark blue')])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('quote', wagtail.blocks.TextBlock()), ('quote_author', wagtail.blocks.CharBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))]))], blank=True, use_json_field=True), + ), + ] diff --git a/apps/cms/pages/models.py b/apps/cms/pages/models.py index 44bb398dd..ee23fb6e8 100644 --- a/apps/cms/pages/models.py +++ b/apps/cms/pages/models.py @@ -1,17 +1,15 @@ import random from django.db import models -from wagtail.admin.edit_handlers import FieldPanel -from wagtail.admin.edit_handlers import MultiFieldPanel -from wagtail.admin.edit_handlers import ObjectList -from wagtail.admin.edit_handlers import PageChooserPanel -from wagtail.admin.edit_handlers import StreamFieldPanel -from wagtail.admin.edit_handlers import TabbedInterface -from wagtail.core import blocks -from wagtail.core import fields -from wagtail.core.models import Page +from wagtail import blocks +from wagtail import fields +from wagtail.admin.panels import FieldPanel +from wagtail.admin.panels import MultiFieldPanel +from wagtail.admin.panels import ObjectList +from wagtail.admin.panels import PageChooserPanel +from wagtail.admin.panels import TabbedInterface from wagtail.images.blocks import ImageChooserBlock -from wagtail.images.edit_handlers import ImageChooserPanel +from wagtail.models import Page from apps.cms import blocks as cms_blocks from apps.cms.news.blocks import NewsBlock @@ -101,7 +99,7 @@ class HomePage(Page): ('paragraph', blocks.RichTextBlock()), ('news', NewsBlock()), ('use_cases', UseCaseBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield_en = fields.StreamField([ ('col_list_image_cta_block', cms_blocks.ColumnsImageCTABlock()), @@ -111,7 +109,7 @@ class HomePage(Page): ('paragraph', blocks.RichTextBlock()), ('news', NewsBlock()), ('use_cases', UseCaseBlock()) - ], blank=True) + ], use_json_field=True, blank=True) hero_title = TranslatedField( 'hero_title_de', @@ -149,14 +147,14 @@ def random_image(self): FieldPanel('hero_title_en'), FieldPanel('hero_subtitle_en'), FieldPanel('body_en'), - StreamFieldPanel('body_streamfield_en') + FieldPanel('body_streamfield_en') ] de_content_panels = [ FieldPanel('hero_title_de'), FieldPanel('hero_subtitle_de'), FieldPanel('body_de'), - StreamFieldPanel('body_streamfield_de') + FieldPanel('body_streamfield_de') ] common_panels = [ @@ -165,11 +163,11 @@ def random_image(self): PageChooserPanel('form_page', 'a4_candy_cms_contacts.FormPage'), MultiFieldPanel( [ - ImageChooserPanel('image_1'), - ImageChooserPanel('image_2'), - ImageChooserPanel('image_3'), - ImageChooserPanel('image_4'), - ImageChooserPanel('image_5'), + FieldPanel('image_1'), + FieldPanel('image_2'), + FieldPanel('image_3'), + FieldPanel('image_4'), + FieldPanel('image_5'), ], heading="Images", classname="collapsible" @@ -203,7 +201,7 @@ class SimplePage(Page): ('columns_cta', cms_blocks.ColumnsCTABlock()), ('downloads', cms_blocks.DownloadListBlock()), ('quote', cms_blocks.QuoteBlock()) - ]) + ], use_json_field=True) body_streamfield_en = fields.StreamField([ ('html', blocks.RawHTMLBlock()), ('richtext', blocks.RichTextBlock()), @@ -214,7 +212,7 @@ class SimplePage(Page): ('columns_cta', cms_blocks.ColumnsCTABlock()), ('downloads', cms_blocks.DownloadListBlock()), ('quote', cms_blocks.QuoteBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield_nl = fields.StreamField([ ('html', blocks.RawHTMLBlock()), @@ -226,7 +224,7 @@ class SimplePage(Page): ('columns_cta', cms_blocks.ColumnsCTABlock()), ('downloads', cms_blocks.DownloadListBlock()), ('quote', cms_blocks.QuoteBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield_ky = fields.StreamField([ ('html', blocks.RawHTMLBlock()), @@ -238,7 +236,7 @@ class SimplePage(Page): ('columns_cta', cms_blocks.ColumnsCTABlock()), ('downloads', cms_blocks.DownloadListBlock()), ('quote', cms_blocks.QuoteBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield_ru = fields.StreamField([ ('html', blocks.RawHTMLBlock()), @@ -250,7 +248,7 @@ class SimplePage(Page): ('columns_cta', cms_blocks.ColumnsCTABlock()), ('downloads', cms_blocks.DownloadListBlock()), ('quote', cms_blocks.QuoteBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield = TranslatedFieldLegal( 'body_streamfield_de', @@ -261,23 +259,23 @@ class SimplePage(Page): ) en_content_panels = [ - StreamFieldPanel('body_streamfield_en') + FieldPanel('body_streamfield_en') ] de_content_panels = [ - StreamFieldPanel('body_streamfield_de') + FieldPanel('body_streamfield_de') ] nl_content_panels = [ - StreamFieldPanel('body_streamfield_nl') + FieldPanel('body_streamfield_nl') ] ky_content_panels = [ - StreamFieldPanel('body_streamfield_ky') + FieldPanel('body_streamfield_ky') ] ru_content_panels = [ - StreamFieldPanel('body_streamfield_ru') + FieldPanel('body_streamfield_ru') ] common_panels = [ diff --git a/apps/cms/settings/helpers.py b/apps/cms/settings/helpers.py index 9cc8407e2..6805c5fda 100644 --- a/apps/cms/settings/helpers.py +++ b/apps/cms/settings/helpers.py @@ -1,7 +1,7 @@ from django.conf import settings from django.utils.html import mark_safe from django.utils.translation import gettext_lazy as _ -from wagtail.core.models import Site +from wagtail.models import Site from apps.cms.settings.models import ImportantPages diff --git a/apps/cms/settings/migrations/0001_initial.py b/apps/cms/settings/migrations/0001_initial.py index c86587fa5..e634b9fb6 100644 --- a/apps/cms/settings/migrations/0001_initial.py +++ b/apps/cms/settings/migrations/0001_initial.py @@ -2,7 +2,7 @@ from django.db import migrations, models import django.db.models.deletion -import wagtail.core.fields +import wagtail.fields class Migration(migrations.Migration): @@ -31,8 +31,8 @@ class Migration(migrations.Migration): name='OrganisationSettings', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('address', wagtail.core.fields.RichTextField()), - ('contacts', wagtail.core.fields.RichTextField()), + ('address', wagtail.fields.RichTextField()), + ('contacts', wagtail.fields.RichTextField()), ('site', models.OneToOneField(editable=False, on_delete=django.db.models.deletion.CASCADE, to='wagtailcore.Site')), ], options={ diff --git a/apps/cms/settings/migrations/0006_add_helptexts_to_organisation_pages.py b/apps/cms/settings/migrations/0006_add_helptexts_to_organisation_pages.py index 2cb50289a..d631125a9 100644 --- a/apps/cms/settings/migrations/0006_add_helptexts_to_organisation_pages.py +++ b/apps/cms/settings/migrations/0006_add_helptexts_to_organisation_pages.py @@ -1,7 +1,7 @@ # Generated by Django 2.2.17 on 2021-02-16 19:33 from django.db import migrations, models -import wagtail.core.fields +import wagtail.fields class Migration(migrations.Migration): @@ -18,12 +18,12 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='organisationsettings', name='address', - field=wagtail.core.fields.RichTextField(help_text='The address is published on the contact form.'), + field=wagtail.fields.RichTextField(help_text='The address is published on the contact form.'), ), migrations.AlterField( model_name='organisationsettings', name='contacts', - field=wagtail.core.fields.RichTextField(help_text='The contacts are published on the contact form.'), + field=wagtail.fields.RichTextField(help_text='The contacts are published on the contact form.'), ), migrations.AlterField( model_name='organisationsettings', diff --git a/apps/cms/settings/models.py b/apps/cms/settings/models.py index 03cd0d616..815f78bf1 100644 --- a/apps/cms/settings/models.py +++ b/apps/cms/settings/models.py @@ -1,10 +1,9 @@ from django.db import models -from wagtail.admin.edit_handlers import FieldPanel -from wagtail.admin.edit_handlers import PageChooserPanel +from wagtail import fields +from wagtail.admin.panels import FieldPanel +from wagtail.admin.panels import PageChooserPanel from wagtail.contrib.settings.models import BaseSetting from wagtail.contrib.settings.models import register_setting -from wagtail.core import fields -from wagtail.images.edit_handlers import ImageChooserPanel from apps.contrib.translations import TranslatedField @@ -144,7 +143,7 @@ class SocialMedia(BaseSetting): FieldPanel('facebook'), FieldPanel('twitter'), FieldPanel('github'), - ImageChooserPanel('fallback_image'), + FieldPanel('fallback_image'), FieldPanel('fallback_description_de'), FieldPanel('fallback_description_en') ] diff --git a/apps/cms/use_cases/blocks.py b/apps/cms/use_cases/blocks.py index 8838ae6f2..09793e07e 100644 --- a/apps/cms/use_cases/blocks.py +++ b/apps/cms/use_cases/blocks.py @@ -1,4 +1,4 @@ -from wagtail.core import blocks +from wagtail import blocks from apps.cms.blocks import CallToActionBlock diff --git a/apps/cms/use_cases/migrations/0001_initial.py b/apps/cms/use_cases/migrations/0001_initial.py index 5876e6a08..c0a2655da 100644 --- a/apps/cms/use_cases/migrations/0001_initial.py +++ b/apps/cms/use_cases/migrations/0001_initial.py @@ -2,8 +2,8 @@ from django.db import migrations, models import django.db.models.deletion -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -24,8 +24,8 @@ class Migration(migrations.Migration): ('category', models.CharField(choices=[('MP', 'Municipalities'), ('CA', 'Citizen Assemblies'), ('CO', 'Co-Operatives'), ('NG', 'NGOs'), ('CP', 'Companies'), ('PO', 'Politicians')], max_length=2)), ('title_de', models.CharField(blank=True, max_length=250, verbose_name='German Title')), ('title_en', models.CharField(blank=True, max_length=250, verbose_name='English Title')), - ('body_streamfield_de', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('html', wagtail.core.blocks.RawHTMLBlock()), ('examples', wagtail.core.blocks.StructBlock([('examples', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))]))], blank=True)), - ('body_streamfield_en', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('html', wagtail.core.blocks.RawHTMLBlock()), ('examples', wagtail.core.blocks.StructBlock([('examples', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('body', wagtail.core.blocks.RichTextBlock(required=False)), ('link', wagtail.core.blocks.CharBlock(required=False)), ('link_text', wagtail.core.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))]))], blank=True)), + ('body_streamfield_de', wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock()), ('examples', wagtail.blocks.StructBlock([('examples', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))]))], blank=True)), + ('body_streamfield_en', wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock()), ('examples', wagtail.blocks.StructBlock([('examples', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))]))], blank=True)), ('image', models.ForeignKey(blank=True, help_text='The Image that is shown on the use case item page and the use case index page', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='a4_candy_cms_images.CustomImage', verbose_name='Use Case Header Image')), ], options={ diff --git a/apps/cms/use_cases/migrations/0003_auto_20220614_1427.py b/apps/cms/use_cases/migrations/0003_auto_20220614_1427.py new file mode 100644 index 000000000..90042bc64 --- /dev/null +++ b/apps/cms/use_cases/migrations/0003_auto_20220614_1427.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.13 on 2022-06-14 12:27 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('a4_candy_cms_use_cases', '0002_auto_20191106_1724'), + ] + + operations = [ + migrations.AlterField( + model_name='usecasepage', + name='body_streamfield_de', + field=wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock()), ('examples', wagtail.blocks.StructBlock([('examples', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='usecasepage', + name='body_streamfield_en', + field=wagtail.fields.StreamField([('paragraph', wagtail.blocks.RichTextBlock()), ('html', wagtail.blocks.RawHTMLBlock()), ('examples', wagtail.blocks.StructBlock([('examples', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('body', wagtail.blocks.RichTextBlock(required=False)), ('link', wagtail.blocks.CharBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(label='Link Text', max_length=50, required=False))], label='CTA Column')))]))], blank=True, use_json_field=True), + ), + ] diff --git a/apps/cms/use_cases/models.py b/apps/cms/use_cases/models.py index 6b7c6cf05..fc149cdad 100644 --- a/apps/cms/use_cases/models.py +++ b/apps/cms/use_cases/models.py @@ -1,14 +1,12 @@ from django.db import models from django.utils.translation import gettext_lazy as _ -from wagtail.admin.edit_handlers import FieldPanel -from wagtail.admin.edit_handlers import ObjectList -from wagtail.admin.edit_handlers import PageChooserPanel -from wagtail.admin.edit_handlers import StreamFieldPanel -from wagtail.admin.edit_handlers import TabbedInterface -from wagtail.core import blocks -from wagtail.core import fields -from wagtail.core.models import Page -from wagtail.images.edit_handlers import ImageChooserPanel +from wagtail import blocks +from wagtail import fields +from wagtail.admin.panels import FieldPanel +from wagtail.admin.panels import ObjectList +from wagtail.admin.panels import PageChooserPanel +from wagtail.admin.panels import TabbedInterface +from wagtail.models import Page from apps.contrib.translations import TranslatedField @@ -133,13 +131,13 @@ class UseCasePage(Page): ('paragraph', blocks.RichTextBlock()), ('html', blocks.RawHTMLBlock()), ('examples', ExampleBlock()) - ], blank=True) + ], use_json_field=True, blank=True) body_streamfield_en = fields.StreamField([ ('paragraph', blocks.RichTextBlock()), ('html', blocks.RawHTMLBlock()), ('examples', ExampleBlock()) - ], blank=True) + ], use_json_field=True, blank=True) subtitle = TranslatedField( 'title_de', @@ -173,17 +171,17 @@ def get_context(self, request): en_content_panels = [ FieldPanel('title_en'), - StreamFieldPanel('body_streamfield_en') + FieldPanel('body_streamfield_en') ] de_content_panels = [ FieldPanel('title_de'), - StreamFieldPanel('body_streamfield_de') + FieldPanel('body_streamfield_de') ] common_panels = [ FieldPanel('title'), - ImageChooserPanel('image'), + FieldPanel('image'), FieldPanel('slug'), FieldPanel('category') ] diff --git a/apps/contrib/translations.py b/apps/contrib/translations.py index 72a4b8948..6ff324738 100644 --- a/apps/contrib/translations.py +++ b/apps/contrib/translations.py @@ -1,5 +1,5 @@ from django.utils import translation -from wagtail.core.blocks.stream_block import StreamValue +from wagtail.blocks.stream_block import StreamValue class TranslatedField(object): diff --git a/requirements/base.txt b/requirements/base.txt index 3bb5ab18e..656fb1729 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -9,7 +9,7 @@ django-cloudflare-push==0.2.1 django_csp==3.7 django-parler==2.3 sentry-sdk==1.5.12 -wagtail==2.16.2 +wagtail==3.0.0 whitenoise==6.2.0 xmltodict==0.13.0 zeep==4.1.0