diff --git a/.gitignore b/.gitignore index 02305bc4..b32eef57 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,5 @@ package-lock.json media conf/.env conf/env/secrets-do-not-commit + +.pii-secret-hook/file_content/pii-secret-log diff --git a/components/migrations/0006_use_new_markdown_field.py b/components/migrations/0006_use_new_markdown_field.py new file mode 100644 index 00000000..f5e90281 --- /dev/null +++ b/components/migrations/0006_use_new_markdown_field.py @@ -0,0 +1,58 @@ +# Generated by Django 4.1.9 on 2023-07-20 09:07 + +from django.db import migrations +import wagtailmarkdown.fields + + +class Migration(migrations.Migration): + dependencies = [ + ('components', '0005_auto_20190823_1036'), + ] + + operations = [ + migrations.AlterField( + model_name='bannercomponent', + name='banner_content', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='bannercomponent', + name='banner_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + ] diff --git a/components/models.py b/components/models.py index 164db5bc..b6381d66 100644 --- a/components/models.py +++ b/components/models.py @@ -1,16 +1,11 @@ -from django.db import models from directory_constants import cms -from core.models import ( - BasePage, - ExclusivePageMixin, - ServiceMixin, -) -from wagtail.admin.panels import ( - FieldPanel, MultiFieldPanel -) -from core.mixins import ServiceNameUniqueSlugMixin +from django.db import models +from wagtail.admin.panels import FieldPanel, MultiFieldPanel +from wagtailmarkdown.fields import MarkdownField + from core.helpers import make_translated_interface -from core.model_fields import MarkdownField +from core.mixins import ServiceNameUniqueSlugMixin +from core.models import BasePage, ExclusivePageMixin, ServiceMixin class BaseComponentsPage(ServiceNameUniqueSlugMixin, BasePage): @@ -40,7 +35,7 @@ class BannerComponent(BaseComponentsPage): children=[ FieldPanel('banner_label'), FieldPanel('banner_content'), - ] + ], ), ] diff --git a/conf/settings.py b/conf/settings.py index 9eb575d5..1967ad6c 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -15,13 +15,12 @@ import os import dj_database_url -from django.urls import reverse_lazy import environ import sentry_sdk +from django.urls import reverse_lazy from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk.integrations.django import DjangoIntegration - env = environ.Env() for env_file in env.list('ENV_FILES', default=[]): env.read_env(os.path.join(os.path.dirname(__file__), f'env/{env_file}')) @@ -91,6 +90,7 @@ 'authbroker_client', 'django_celery_beat', 'drf_spectacular', + 'wagtailmarkdown', ] MIDDLEWARE = [ @@ -385,7 +385,7 @@ # so using an invalid default here to prevent breakages locally / in tests GOVNOTIFY_API_KEY = env.str( 'GOVNOTIFY_API_KEY', - 'directory_cms_invalid-03185ee5-578c-4ffc-8774-2288e7b34e63-e82262ea-ae8c-4c6d-8570-c16afdc8347f', # noqa + 'directory_cms_invalid-03185ee5-578c-4ffc-8774-2288e7b34e63-e82262ea-ae8c-4c6d-8570-c16afdc8347f', # noqa /PS-IGNORE ) GOVNOTIFY_REPLY_TO_EMAIL_ID = env.str('GOVNOTIFY_REPLY_TO_EMAIL_ID', '') GOVNOTIFY_USER_PENDING_APPROVAL_TEMPLATE_ID = env.str('GOVNOTIFY_USER_PENDING_APPROVAL_TEMPLATE_ID', '') @@ -432,7 +432,7 @@ REST_FRAMEWORK = { 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', - 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',) + 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), } if FEATURE_FLAGS['DEBUG_TOOLBAR_ON']: diff --git a/core/helpers.py b/core/helpers.py index 71eea2d6..23e3a406 100644 --- a/core/helpers.py +++ b/core/helpers.py @@ -1,26 +1,24 @@ -from num2words import num2words import copy import os from urllib.parse import urljoin import bleach import markdown - -from bleach_whitelist import markdown_tags, markdown_attrs -from modeltranslation.utils import build_localized_fieldname -from wagtail.admin.panels import ObjectList, TabbedInterface -from wagtail import hooks -from wagtail.models import Page -from wagtail.documents.models import Document -from wagtail.images.models import Image - +from bleach_whitelist import markdown_attrs, markdown_tags from django.conf import settings -from django.core.files.storage import default_storage from django.core.files.images import get_image_dimensions +from django.core.files.storage import default_storage from django.http import JsonResponse +from django.urls import Resolver404, resolve from django.utils.safestring import mark_safe from django.utils.translation import trans_real -from django.urls import resolve, Resolver404 +from modeltranslation.utils import build_localized_fieldname +from num2words import num2words +from wagtail import hooks +from wagtail.admin.panels import ObjectList, TabbedInterface +from wagtail.documents.models import Document +from wagtail.images.models import Image +from wagtail.models import Page from core import permissions @@ -51,37 +49,20 @@ def translate_panel(panel, language_code): panel = copy.deepcopy(panel) if hasattr(panel, 'field_name'): - panel.field_name = build_localized_fieldname( - field_name=panel.field_name, lang=language_code - ) + panel.field_name = build_localized_fieldname(field_name=panel.field_name, lang=language_code) if hasattr(panel, 'relation_name'): - panel.relation_name = build_localized_fieldname( - field_name=panel.relation_name, lang=language_code - ) + panel.relation_name = build_localized_fieldname(field_name=panel.relation_name, lang=language_code) if hasattr(panel, 'children'): - panel.children = [ - translate_panel(child, language_code) for child in panel.children - ] + panel.children = [translate_panel(child, language_code) for child in panel.children] return panel -def make_translated_interface( - content_panels, settings_panels=None, other_panels=None -): +def make_translated_interface(content_panels, settings_panels=None, other_panels=None): panels = [] for code, name in settings.LANGUAGES: - panels.append( - ObjectList( - [translate_panel(panel, code) for panel in content_panels], - heading=name - ) - ) + panels.append(ObjectList([translate_panel(panel, code) for panel in content_panels], heading=name)) if settings_panels: - panels.append( - ObjectList( - settings_panels, classname='settings', heading='Settings' - ) - ) + panels.append(ObjectList(settings_panels, classname='settings', heading='Settings')) if other_panels: panels += other_panels return TabbedInterface(panels) @@ -154,15 +135,16 @@ def to_form(index, item): defaults.update(item) return defaults - data_dict = {str(index): to_form(index, item) - for index, item in enumerate(items)} + data_dict = {str(index): to_form(index, item) for index, item in enumerate(items)} - data_dict.update({ - 'TOTAL_FORMS': str(len(data_dict)), - 'INITIAL_FORMS': str(initial), - 'MIN_NUM_FORMS': str(min), - 'MAX_NUM_FORMS': str(max), - }) + data_dict.update( + { + 'TOTAL_FORMS': str(len(data_dict)), + 'INITIAL_FORMS': str(initial), + 'MIN_NUM_FORMS': str(min), + 'MAX_NUM_FORMS': str(max), + } + ) return data_dict @@ -172,6 +154,7 @@ def replace_hook(hook_name, original_fn): def inner(fn): hooks.register('register_page_listing_buttons', fn) return fn + return inner @@ -191,7 +174,7 @@ def render_markdown(text, context=None): 'tables', 'smarty', ], - output_format='html5' + output_format='html5', ) sanitised_html = bleach.clean( html, @@ -201,7 +184,7 @@ def render_markdown(text, context=None): return mark_safe(sanitised_html) -class LinkPattern(markdown.inlinepatterns.LinkPattern): +class LinkPattern(markdown.inlinepatterns.LinkInlineProcessor): def sanitize_url(self, url): if url.startswith('slug:'): slug = url.split(':')[1] @@ -212,13 +195,11 @@ def sanitize_url(self, url): class LinkerExtension(markdown.Extension): def extendMarkdown(self, md, md_globals): - md.inlinePatterns['link'] = LinkPattern( - markdown.inlinepatterns.LINK_RE, md - ) + md.inlinePatterns['link'] = LinkPattern(markdown.inlinepatterns.LINK_RE, md) def get_page_full_url(domain, full_path): - """ Urljoin quirkiness + """Urljoin quirkiness urljoin('http://great.gov.uk/international/', 'test/') http://great.gov.uk/international/test/ diff --git a/great_international/migrations/0163_use_new_markdown_field.py b/great_international/migrations/0163_use_new_markdown_field.py new file mode 100644 index 00000000..bf0b5370 --- /dev/null +++ b/great_international/migrations/0163_use_new_markdown_field.py @@ -0,0 +1,1749 @@ +# Generated by Django 4.1.9 on 2023-07-20 09:15 + +from django.db import migrations +import wagtailmarkdown.fields + + +class Migration(migrations.Migration): + dependencies = [ + ('great_international', '0162_internationalarticlepage_article_image_ar_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='contact_us_section_summary_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name='Summary'), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='ebook_section_body_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutditservicespage', + name='teaser_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True, verbose_name=''), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='contact_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionlistingpage', + name='intro_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='case_study_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='contact_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='property_and_infrastructure_section_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='region_summary_section_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_one_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_three_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='aboutukregionpage', + name='sub_section_two_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformpage', + name='intro_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='message_box_description_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='capitalinvestcontactformsuccesspage', + name='what_happens_next_description_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='list_teaser_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='article_body_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='related_content_intro_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_one_intro_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='section_two_intro_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_one_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_three_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='selling_point_two_content_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='intro_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='hero_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='industries_list_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='proposition_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_four_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_one_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_three_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_column_two_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradehomepage', + name='services_list_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='introduction_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text', + field=wagtailmarkdown.fields.MarkdownField(blank=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='internationaltradeindustrycontactpage', + name='success_message_text_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction', + field=wagtailmarkdown.fields.MarkdownField(), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentgeneralcontentpage', + name='introduction_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_ar', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_de', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_en_gb', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_es', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_fr', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_ja', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_pt', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='important_links_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(blank=True, null=True), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.' + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_ar', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_de', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_en_gb', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_es', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_fr', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_ja', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_pt', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='investmentopportunitypage', + name='introduction_zh_hans', + field=wagtailmarkdown.fields.MarkdownField( + help_text='A single paragraph to introduce the opportunity – what is the vision / ambition of the opportunity, timeline and where relevant, procurement method. What type of investor is this suitable for? Where is it and why is that important? Further detail can be provided in the “The Opportunity” section.', + null=True, + ), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_ar', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_de', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_en_gb', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_es', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_fr', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_ja', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_pt', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + migrations.AlterField( + model_name='whyinvestintheukpage', + name='introduction_zh_hans', + field=wagtailmarkdown.fields.MarkdownField(null=True), + ), + ] diff --git a/great_international/models/capital_invest.py b/great_international/models/capital_invest.py index 2f9a3fc1..130df0e9 100644 --- a/great_international/models/capital_invest.py +++ b/great_international/models/capital_invest.py @@ -1,35 +1,28 @@ +from directory_constants import slugs from django.db import models +from wagtail.admin.panels import FieldPanel, MultiFieldPanel, PageChooserPanel +from wagtailmarkdown.fields import MarkdownField -from wagtail.admin.panels import ( - FieldPanel, MultiFieldPanel, PageChooserPanel -) - - +import great_international.panels.capital_invest as panels from core.models import WagtailAdminExclusivePageMixin -from core.model_fields import MarkdownField - from great_international.models.base import BaseInternationalPage -import great_international.panels.capital_invest as panels -from directory_constants import slugs class RegionCardField(models.Model): region_card_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) region_card_title = models.CharField(max_length=255, blank=True) region_card_summary = MarkdownField(blank=True) panels = [ - MultiFieldPanel([ - FieldPanel('region_card_image'), - FieldPanel('region_card_title'), - FieldPanel('region_card_summary'), - ]), + MultiFieldPanel( + [ + FieldPanel('region_card_image'), + FieldPanel('region_card_title'), + FieldPanel('region_card_summary'), + ] + ), ] class Meta: @@ -38,27 +31,21 @@ class Meta: class HomesInEnglandCardField(models.Model): homes_in_england_card_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) homes_in_england_card_title = models.CharField(max_length=255, blank=True) homes_in_england_card_pdf_document = models.ForeignKey( - 'wagtaildocs.Document', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtaildocs.Document', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) panels = [ - MultiFieldPanel([ - FieldPanel('homes_in_england_card_image'), - FieldPanel('homes_in_england_card_title'), - FieldPanel('homes_in_england_card_pdf_document'), - ]), + MultiFieldPanel( + [ + FieldPanel('homes_in_england_card_image'), + FieldPanel('homes_in_england_card_title'), + FieldPanel('homes_in_england_card_pdf_document'), + ] + ), ] class Meta: @@ -67,18 +54,11 @@ class Meta: class RelatedRegion(models.Model): related_region = models.ForeignKey( - 'great_international.AboutUkRegionPage', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'great_international.AboutUkRegionPage', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) panels = [ - PageChooserPanel( - 'related_region', - ['great_international.AboutUkRegionPage'] - ), + PageChooserPanel('related_region', ['great_international.AboutUkRegionPage']), ] class Meta: @@ -88,9 +68,7 @@ class Meta: class CapitalInvestContactFormPage( panels.CapitalInvestContactFormPagePanels, WagtailAdminExclusivePageMixin, BaseInternationalPage ): - parent_page_types = [ - 'great_international.InvestmentAtlasLandingPage' - ] + parent_page_types = ['great_international.InvestmentAtlasLandingPage'] slug_identity = slugs.CONTACT_FORM_SLUG breadcrumbs_label = models.CharField(max_length=255, blank=True) @@ -99,16 +77,14 @@ class CapitalInvestContactFormPage( comment = models.TextField( max_length=255, default="To provide you with the best help, we may forward your message to " - "appropriate Capital Investment team colleagues in British embassies, " - "high commissions and consulates located internationally. " + "appropriate Capital Investment team colleagues in British embassies, " + "high commissions and consulates located internationally. ", ) cta_text = models.CharField(max_length=255) @classmethod def allowed_subpage_models(cls): - return [ - CapitalInvestContactFormSuccessPage - ] + return [CapitalInvestContactFormSuccessPage] class CapitalInvestContactFormSuccessPage( @@ -116,7 +92,7 @@ class CapitalInvestContactFormSuccessPage( ): parent_page_types = [ 'great_international.CapitalInvestContactFormPage', - 'great_international.InvestmentAtlasLandingPage' + 'great_international.InvestmentAtlasLandingPage', ] slug_identity = slugs.FORM_SUCCESS_SLUG diff --git a/great_international/models/find_a_supplier.py b/great_international/models/find_a_supplier.py index 0e7b8d5b..899ecd76 100644 --- a/great_international/models/find_a_supplier.py +++ b/great_international/models/find_a_supplier.py @@ -1,40 +1,30 @@ -from django.db import models - from directory_constants import slugs +from django.db import models +from wagtailmarkdown.fields import MarkdownField -from core.models import ExclusivePageMixin, BreadcrumbMixin -from core.model_fields import MarkdownField +import great_international.panels.find_a_supplier as panels +from core.models import BreadcrumbMixin, ExclusivePageMixin from .base import BaseInternationalPage -import great_international.panels.find_a_supplier as panels class InternationalTradeHomePage( - panels.InternationalTradeHomePagePanels, ExclusivePageMixin, - BreadcrumbMixin, BaseInternationalPage, + panels.InternationalTradeHomePagePanels, + ExclusivePageMixin, + BreadcrumbMixin, + BaseInternationalPage, ): slug_identity = slugs.FAS_INTERNATIONAL_HOME_PAGE parent_page_types = ['great_international.InternationalHomePage'] subpage_types = ['InternationalTradeIndustryContactPage', 'great_international.AboutDitServicesPage'] hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) mobile_hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - hero_image_caption = models.CharField( - max_length=255, - blank=True + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) + hero_image_caption = models.CharField(max_length=255, blank=True) breadcrumbs_label = models.CharField(max_length=50) hero_text = MarkdownField(blank=False) search_field_placeholder = models.CharField(max_length=500) @@ -51,32 +41,16 @@ class InternationalTradeHomePage( blank=False, ) services_column_one_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) services_column_two_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) services_column_three_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) services_column_four_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) how_we_help_cta_text = models.CharField(max_length=255, blank=True) @@ -84,7 +58,9 @@ class InternationalTradeHomePage( class InternationalTradeIndustryContactPage( - panels.InternationalTradeIndustryContactPagePanels, ExclusivePageMixin, BreadcrumbMixin, + panels.InternationalTradeIndustryContactPagePanels, + ExclusivePageMixin, + BreadcrumbMixin, BaseInternationalPage, ): parent_page_types = ['InternationalTradeHomePage'] diff --git a/great_international/models/great_international.py b/great_international/models/great_international.py index f31f8938..8ad87ce3 100644 --- a/great_international/models/great_international.py +++ b/great_international/models/great_international.py @@ -4,14 +4,16 @@ from wagtail.blocks import PageChooserBlock from wagtail.fields import StreamField from wagtail.models import Orderable +from wagtailmarkdown.fields import MarkdownField + +from core import snippets from core.constants import ARTICLE_TYPES from core.fields import single_struct_block_stream_field_factory from core.mixins import ServiceHomepageMixin -from core.model_fields import MarkdownField from core.models import WagtailAdminExclusivePageMixin -from core import snippets from great_international.blocks import great_international as blocks from great_international.panels import great_international as panels + from . import find_a_supplier as fas_models from .base import BaseInternationalPage @@ -27,12 +29,7 @@ class InternationalInvestmentSectorPage( snippets.Tag, blank=True, ) - hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+' - ) + hero_image = models.ForeignKey('wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+') hero_video = models.ForeignKey( 'wagtailmedia.Media', null=True, @@ -49,19 +46,13 @@ class InternationalInvestmentSectorPage( help_text='Displayed below the sector name', ) featured_description = models.TextField( - blank=True, - help_text='This is the description shown when the sector is featured on another page' + blank=True, help_text='This is the description shown when the sector is featured on another page' ) intro_text = MarkdownField( blank=True, null=True, ) - intro_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+' - ) + intro_image = models.ForeignKey('wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+') # Contact details contact_name = models.CharField( @@ -69,11 +60,7 @@ class InternationalInvestmentSectorPage( blank=True, ) contact_avatar = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) contact_job_title = models.CharField( max_length=255, @@ -85,9 +72,7 @@ class InternationalInvestmentSectorPage( max_length=1500, ) contact_link_button_preamble = models.CharField( - max_length=255, - blank=True, - help_text='eg: "Contact the sector lead"' + max_length=255, blank=True, help_text='eg: "Contact the sector lead"' ) contact_link_button_label = models.CharField( max_length=255, @@ -96,7 +81,7 @@ class InternationalInvestmentSectorPage( related_opportunities_header = models.CharField( max_length=255, blank=True, - help_text='You may want to phrase this to suit the kind of opportunities being featured, if not automatic' + help_text='You may want to phrase this to suit the kind of opportunities being featured, if not automatic', ) manually_selected_related_opportunities = single_struct_block_stream_field_factory( field_name='related_opportunity', @@ -109,7 +94,7 @@ class InternationalInvestmentSectorPage( help_text=( 'Max 3 will be shown. If none is specified, three will be automatically chosen ' 'based on matching sector, their priority_weighting and most recent creation' - ) + ), ) downpage_content = single_struct_block_stream_field_factory( @@ -122,7 +107,7 @@ class InternationalInvestmentSectorPage( early_opportunities_header = models.CharField( max_length=255, blank=True, - help_text='Set to "Early investment opportunities" or customise based on the sector, as appropriate' + help_text='Set to "Early investment opportunities" or customise based on the sector, as appropriate', ) early_opportunities = single_struct_block_stream_field_factory( @@ -181,6 +166,7 @@ class InternationalHomePage( @classmethod def allowed_subpage_models(cls): from . import investment_atlas as investment_atlas_models + return [ InternationalArticleListingPage, InternationalTopicLandingPage, @@ -190,7 +176,6 @@ def allowed_subpage_models(cls): class InternationalArticlePage(panels.InternationalArticlePagePanels, BaseInternationalPage): - parent_page_types = [ 'great_international.InternationalArticleListingPage', 'great_international.InternationalCampaignPage', @@ -204,11 +189,7 @@ class InternationalArticlePage(panels.InternationalArticlePagePanels, BaseIntern type_of_article = models.TextField(choices=ARTICLE_TYPES, null=True, blank=True) hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) hero_video = models.ForeignKey( @@ -220,51 +201,24 @@ class InternationalArticlePage(panels.InternationalArticlePagePanels, BaseIntern ) article_title = models.TextField() article_subheading = models.TextField( - blank=True, - help_text="This is a subheading that displays " - "below the main title on the article page" + blank=True, help_text="This is a subheading that displays " "below the main title on the article page" ) article_teaser = models.TextField( - blank=True, - help_text="This is a subheading that displays when the article " - "is featured on another page" + blank=True, help_text="This is a subheading that displays when the article " "is featured on another page" ) article_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) article_video = models.ForeignKey( - 'wagtailmedia.Media', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailmedia.Media', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) article_body_text = MarkdownField() - cta_title = models.CharField( - max_length=255, - blank=True, - verbose_name='CTA title' - ) - cta_teaser = models.TextField( - blank=True, - verbose_name='CTA teaser' - ) + cta_title = models.CharField(max_length=255, blank=True, verbose_name='CTA title') + cta_teaser = models.TextField(blank=True, verbose_name='CTA teaser') - cta_link_label = models.CharField( - max_length=255, - blank=True, - verbose_name='CTA link label' - ) - cta_link = models.CharField( - max_length=255, - blank=True, - verbose_name='CTA link' - ) + cta_link_label = models.CharField(max_length=255, blank=True, verbose_name='CTA link label') + cta_link = models.CharField(max_length=255, blank=True, verbose_name='CTA link') tags = ParentalManyToManyField(snippets.Tag, blank=True) @@ -272,7 +226,7 @@ class InternationalArticlePage(panels.InternationalArticlePagePanels, BaseIntern class InternationalArticleListingPage(panels.InternationalArticleListingPagePanels, BaseInternationalPage): parent_page_types = [ 'great_international.InternationalHomePage', - 'great_international.InternationalTopicLandingPage' + 'great_international.InternationalTopicLandingPage', ] subpage_types = [ 'great_international.InternationalArticlePage', @@ -281,11 +235,7 @@ class InternationalArticleListingPage(panels.InternationalArticleListingPagePane landing_page_title = models.CharField(max_length=255) hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) hero_teaser = models.CharField(max_length=255, null=True, blank=True) list_teaser = MarkdownField(null=True, blank=True) @@ -293,9 +243,7 @@ class InternationalArticleListingPage(panels.InternationalArticleListingPagePane @property def articles_count(self): - return self.get_descendants().type( - InternationalArticlePage - ).live().count() + return self.get_descendants().type(InternationalArticlePage).live().count() class InternationalCampaignPage(panels.InternationalCampaignPagePanels, BaseInternationalPage): @@ -303,53 +251,34 @@ class InternationalCampaignPage(panels.InternationalCampaignPagePanels, BaseInte 'great_international.InternationalArticleListingPage', 'great_international.InternationalTopicLandingPage', ] - subpage_types = [ - 'great_international.InternationalArticlePage' - ] + subpage_types = ['great_international.InternationalArticlePage'] view_path = 'campaigns/' campaign_subheading = models.CharField( max_length=255, blank=True, - help_text="This is a subheading that displays " - "when the article is featured on another page" + help_text="This is a subheading that displays " "when the article is featured on another page", ) campaign_teaser = models.CharField(max_length=255, null=True, blank=True) campaign_heading = models.CharField(max_length=255) campaign_hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) section_one_heading = models.CharField(max_length=255) section_one_intro = MarkdownField() section_one_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) selling_point_one_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) selling_point_one_heading = models.CharField(max_length=255) selling_point_one_content = MarkdownField() selling_point_two_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) selling_point_two_heading = models.CharField( max_length=255, @@ -359,51 +288,23 @@ class InternationalCampaignPage(panels.InternationalCampaignPagePanels, BaseInte selling_point_two_content = MarkdownField(null=True, blank=True) selling_point_three_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - selling_point_three_heading = models.CharField( - max_length=255, - null=True, - blank=True + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) + selling_point_three_heading = models.CharField(max_length=255, null=True, blank=True) selling_point_three_content = MarkdownField(null=True, blank=True) - section_one_contact_button_url = models.CharField( - max_length=255, - null=True, - blank=True - ) - section_one_contact_button_text = models.CharField( - max_length=255, - null=True, - blank=True - ) + section_one_contact_button_url = models.CharField(max_length=255, null=True, blank=True) + section_one_contact_button_text = models.CharField(max_length=255, null=True, blank=True) section_two_heading = models.CharField(max_length=255) section_two_intro = MarkdownField() section_two_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) - section_two_contact_button_url = models.CharField( - max_length=255, - null=True, - blank=True - ) - section_two_contact_button_text = models.CharField( - max_length=255, - null=True, - blank=True - ) + section_two_contact_button_url = models.CharField(max_length=255, null=True, blank=True) + section_two_contact_button_text = models.CharField(max_length=255, null=True, blank=True) related_content_heading = models.CharField(max_length=255) related_content_intro = MarkdownField() @@ -452,11 +353,7 @@ class InternationalTopicLandingPage(panels.InternationalTopicLandingPagePanels, landing_page_title = models.CharField(max_length=255) hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) hero_teaser = models.CharField(max_length=255, null=True, blank=True) tags = ParentalManyToManyField(snippets.Tag, blank=True) @@ -469,44 +366,22 @@ class InternationalTopicLandingPage(panels.InternationalTopicLandingPagePanels, ) related_page_one = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailcore.Page', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) related_page_two = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailcore.Page', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) related_page_three = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailcore.Page', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) class AboutDitServiceField(panels.AboutDitServiceFieldPanels, models.Model): - icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True - ) + icon = models.ForeignKey('wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True) title = models.CharField(max_length=255, blank=True) summary = models.TextField(max_length=255, blank=True) - link_text = models.CharField(max_length=255, - blank=True, - verbose_name='Link text') - link_url = models.CharField(max_length=255, - blank=True, - verbose_name='Link URL') + link_text = models.CharField(max_length=255, blank=True, verbose_name='Link text') + link_url = models.CharField(max_length=255, blank=True, verbose_name='Link URL') class Meta: abstract = True @@ -529,81 +404,43 @@ class AboutDitServicesPage(panels.AboutDitServicesPagePanels, BaseInternationalP breadcrumbs_label = models.CharField(max_length=255) hero_title = models.CharField(max_length=255) - hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+' - ) + hero_image = models.ForeignKey('wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+') - teaser = MarkdownField( - null=True, - verbose_name='', - blank=True - ) + teaser = MarkdownField(null=True, verbose_name='', blank=True) featured_description = models.TextField( null=True, blank=True, help_text="This will be used when this page is featured as a " - "card on another page i.e. the About DIT landing page" + "card on another page i.e. the About DIT landing page", ) ebook_section_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) ebook_section_image_alt_text = models.CharField( - max_length=255, - blank=True, - help_text="Description of image for screenreaders" + max_length=255, blank=True, help_text="Description of image for screenreaders" ) ebook_section_body = MarkdownField(null=True, blank=True) ebook_section_cta_text = models.CharField(max_length=255, blank=True) ebook_section_cta_link = models.CharField(max_length=255, blank=True) case_study_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) case_study_title = models.CharField(max_length=255, blank=True) case_study_text = models.TextField(max_length=255, blank=True) case_study_cta_text = models.CharField(max_length=255, blank=True) case_study_cta_link = models.CharField(max_length=255, blank=True) - contact_us_section_title = models.CharField( - max_length=255, - blank=True, - verbose_name='Title' - ) - contact_us_section_summary = MarkdownField( - null=True, - blank=True, - verbose_name='Summary' - ) - contact_us_section_cta_text = models.CharField( - max_length=255, - blank=True, - verbose_name='CTA text' - ) - contact_us_section_cta_link = models.CharField( - max_length=255, - blank=True, - verbose_name='CTA URL' - ) + contact_us_section_title = models.CharField(max_length=255, blank=True, verbose_name='Title') + contact_us_section_summary = MarkdownField(null=True, blank=True, verbose_name='Summary') + contact_us_section_cta_text = models.CharField(max_length=255, blank=True, verbose_name='CTA text') + contact_us_section_cta_link = models.CharField(max_length=255, blank=True, verbose_name='CTA URL') class AboutUkRegionListingPage( - panels.AboutUkRegionListingPagePanels, - WagtailAdminExclusivePageMixin, - BaseInternationalPage + panels.AboutUkRegionListingPagePanels, WagtailAdminExclusivePageMixin, BaseInternationalPage ): - slug_identity = 'regions' parent_page_types = [ @@ -616,11 +453,7 @@ class AboutUkRegionListingPage( breadcrumbs_label = models.CharField(max_length=255) hero_title = models.CharField(max_length=255) hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) hero_video = models.ForeignKey( 'wagtailmedia.Media', @@ -638,25 +471,13 @@ class AboutUkRegionListingPage( contact_cta_link = models.CharField(max_length=255, blank=True) related_page_one = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailcore.Page', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) related_page_two = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailcore.Page', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) related_page_three = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' + 'wagtailcore.Page', null=True, blank=True, on_delete=models.SET_NULL, related_name='+' ) @@ -665,39 +486,21 @@ class AboutUkRegionPage(panels.AboutUkRegionPagePanels, BaseInternationalPage): breadcrumbs_label = models.CharField(max_length=255) hero_title = models.CharField(max_length=255) - hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+' - ) + hero_image = models.ForeignKey('wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+') featured_description = models.TextField(max_length=255, blank=True) region_summary_section_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) region_summary_section_strapline = models.TextField( - max_length=255, - blank=True, - help_text="Displayd above Region Section Summary Intro" + max_length=255, blank=True, help_text="Displayd above Region Section Summary Intro" ) region_summary_section_intro = models.TextField(blank=True) region_summary_section_content = MarkdownField(blank=True) - investment_opps_title = models.CharField( - max_length=255, - verbose_name="Investment opportunities title", blank=True - ) - investment_opps_intro = models.CharField( - max_length=255, - blank=True, - verbose_name="Investment opportunities intro" - ) + investment_opps_title = models.CharField(max_length=255, verbose_name="Investment opportunities title", blank=True) + investment_opps_intro = models.CharField(max_length=255, blank=True, verbose_name="Investment opportunities intro") economics_data_title = models.CharField(max_length=255, blank=True) economics_stat_1_number = models.CharField(max_length=255, blank=True) @@ -724,138 +527,58 @@ class AboutUkRegionPage(panels.AboutUkRegionPagePanels, BaseInternationalPage): economics_stat_6_heading = models.CharField(max_length=255, blank=True) economics_stat_6_smallprint = models.CharField(max_length=255, blank=True) - location_data_title = models.CharField( - max_length=255, - blank=True - ) - location_stat_1_number = models.CharField( - max_length=255, - blank=True - ) - location_stat_1_heading = models.CharField( - max_length=255, - blank=True - ) - location_stat_1_smallprint = models.CharField( - max_length=255, - blank=True - ) + location_data_title = models.CharField(max_length=255, blank=True) + location_stat_1_number = models.CharField(max_length=255, blank=True) + location_stat_1_heading = models.CharField(max_length=255, blank=True) + location_stat_1_smallprint = models.CharField(max_length=255, blank=True) - location_stat_2_number = models.CharField( - max_length=255, - blank=True - ) - location_stat_2_heading = models.CharField( - max_length=255, - blank=True - ) - location_stat_2_smallprint = models.CharField( - max_length=255, - blank=True - ) + location_stat_2_number = models.CharField(max_length=255, blank=True) + location_stat_2_heading = models.CharField(max_length=255, blank=True) + location_stat_2_smallprint = models.CharField(max_length=255, blank=True) - location_stat_3_number = models.CharField( - max_length=255, - blank=True - ) - location_stat_3_heading = models.CharField( - max_length=255, - blank=True - ) - location_stat_3_smallprint = models.CharField( - max_length=255, - blank=True - ) + location_stat_3_number = models.CharField(max_length=255, blank=True) + location_stat_3_heading = models.CharField(max_length=255, blank=True) + location_stat_3_smallprint = models.CharField(max_length=255, blank=True) - location_stat_4_number = models.CharField( - max_length=255, - blank=True - ) - location_stat_4_heading = models.CharField( - max_length=255, - blank=True - ) - location_stat_4_smallprint = models.CharField( - max_length=255, - blank=True - ) + location_stat_4_number = models.CharField(max_length=255, blank=True) + location_stat_4_heading = models.CharField(max_length=255, blank=True) + location_stat_4_smallprint = models.CharField(max_length=255, blank=True) - location_stat_5_number = models.CharField( - max_length=255, - blank=True - ) - location_stat_5_heading = models.CharField( - max_length=255, - blank=True - ) - location_stat_5_smallprint = models.CharField( - max_length=255, - blank=True - ) + location_stat_5_number = models.CharField(max_length=255, blank=True) + location_stat_5_heading = models.CharField(max_length=255, blank=True) + location_stat_5_smallprint = models.CharField(max_length=255, blank=True) - location_stat_6_number = models.CharField( - max_length=255, - blank=True - ) - location_stat_6_heading = models.CharField( - max_length=255, - blank=True - ) - location_stat_6_smallprint = models.CharField( - max_length=255, - blank=True - ) + location_stat_6_number = models.CharField(max_length=255, blank=True) + location_stat_6_heading = models.CharField(max_length=255, blank=True) + location_stat_6_smallprint = models.CharField(max_length=255, blank=True) subsections_title = models.CharField(max_length=255, blank=True) sub_section_one_title = models.CharField(max_length=255, blank=True) sub_section_one_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) sub_section_one_content = MarkdownField(blank=True) sub_section_two_title = models.CharField(max_length=255, blank=True) sub_section_two_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) sub_section_two_content = MarkdownField(blank=True) sub_section_three_title = models.CharField(max_length=255, blank=True) sub_section_three_icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) sub_section_three_content = MarkdownField(blank=True) - property_and_infrastructure_section_title = models.CharField( - max_length=255, - blank=True - ) + property_and_infrastructure_section_title = models.CharField(max_length=255, blank=True) property_and_infrastructure_section_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) property_and_infrastructure_section_content = MarkdownField(blank=True) case_study_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) case_study_title = models.CharField(max_length=255, blank=True) case_study_text = MarkdownField(blank=True) @@ -869,31 +592,20 @@ class AboutUkRegionPage(panels.AboutUkRegionPagePanels, BaseInternationalPage): class AboutUkArticleField(panels.AboutUkArticleFieldPanels, models.Model): - image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True - ) + image = models.ForeignKey('wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True) title = models.CharField(max_length=255, blank=True) summary = MarkdownField(blank=True) - link_text = models.CharField(max_length=255, - blank=True, - verbose_name='Link text') - link_url = models.CharField(max_length=255, - blank=True, - verbose_name='Link URL') + link_text = models.CharField(max_length=255, blank=True, verbose_name='Link text') + link_url = models.CharField(max_length=255, blank=True, verbose_name='Link URL') class Meta: abstract = True -class WhyInvestInTheUKPage( - panels.WhyInvestInTheUKPagePanels, - BaseInternationalPage -): - parent_page_types = ['great_international.InvestmentAtlasLandingPage', ] +class WhyInvestInTheUKPage(panels.WhyInvestInTheUKPagePanels, BaseInternationalPage): + parent_page_types = [ + 'great_international.InvestmentAtlasLandingPage', + ] subpage_types = ['great_international.InternationalArticlePage'] hero_image = models.ForeignKey( @@ -902,7 +614,7 @@ class WhyInvestInTheUKPage( on_delete=models.SET_NULL, related_name='+', blank=True, - help_text='Main page hero image, above the title' + help_text='Main page hero image, above the title', ) hero_video = models.ForeignKey( 'wagtailmedia.Media', @@ -912,12 +624,7 @@ class WhyInvestInTheUKPage( related_name='+', ) strapline = models.CharField( - max_length=200, - blank=False, - null=True, - help_text=( - 'A single sentence which goes beneath the page title' - ) + max_length=200, blank=False, null=True, help_text=('A single sentence which goes beneath the page title') ) introduction = MarkdownField( blank=False, @@ -929,7 +636,7 @@ class WhyInvestInTheUKPage( on_delete=models.SET_NULL, related_name='+', blank=True, - help_text='Goes beside the intro text' + help_text='Goes beside the intro text', ) uk_strength_title = models.CharField(max_length=255, blank=True) diff --git a/great_international/models/investment_atlas.py b/great_international/models/investment_atlas.py index 80d1dc64..0f408875 100644 --- a/great_international/models/investment_atlas.py +++ b/great_international/models/investment_atlas.py @@ -1,28 +1,18 @@ -from django.db import models - from directory_constants import slugs - +from django.db import models +from modelcluster.fields import ParentalKey +from wagtail.admin.panels import FieldPanel, HelpPanel, PageChooserPanel from wagtail.fields import StreamField from wagtail.models import Orderable -from wagtail.admin.panels import ( - HelpPanel, - FieldPanel, - PageChooserPanel, -) - -from .base import BaseInternationalPage - -from core.fields import single_struct_block_stream_field_factory -from core.model_fields import MarkdownField - -from core.models import ExclusivePageMixin, FormPageMetaClass, WagtailAdminExclusivePageMixin +from wagtail.snippets.models import register_snippet +from wagtailmarkdown.fields import MarkdownField -from modelcluster.fields import ParentalKey import great_international.blocks.investment_atlas as investment_atlas_blocks import great_international.panels.investment_atlas as investment_atlas_panels +from core.fields import single_struct_block_stream_field_factory +from core.models import ExclusivePageMixin, FormPageMetaClass, WagtailAdminExclusivePageMixin -from wagtail.snippets.models import register_snippet - +from .base import BaseInternationalPage TIME_TO_INVESTMENT_DECISION_0M_6M = 'TIME_TO_INVESTMENT_DECISION_0M_6M' TIME_TO_INVESTMENT_DECISION_6M_12M = 'TIME_TO_INVESTMENT_DECISION_6M_12M' @@ -39,10 +29,7 @@ INVESTMENT_TYPE = 'INVESTMENT_TYPE' RELATED_SECTORS = 'RELATED_SECTORS' -GET_RELATED_OPPORTUNITIES_OPTIONS = ( - (INVESTMENT_TYPE, 'Investment type'), - (RELATED_SECTORS, 'Related sectors') -) +GET_RELATED_OPPORTUNITIES_OPTIONS = ((INVESTMENT_TYPE, 'Investment type'), (RELATED_SECTORS, 'Related sectors')) # FOR ALL THE SNIPPETS: # TODO: translation support: https://wagtail-modeltranslation.readthedocs.io/en/latest/Registering%20Models.html @@ -51,9 +38,7 @@ @register_snippet class InvestmentType(models.Model): # TODO: add modeltranslation support as required, at the snippet model level - name = models.CharField( - max_length=99 - ) + name = models.CharField(max_length=99) def __str__(self): return self.name @@ -62,12 +47,8 @@ def __str__(self): @register_snippet class PlanningStatus(models.Model): # TODO: add modeltranslation support as required, at the snippet model level - name = models.CharField( - max_length=50 - ) - verbose_description = models.CharField( - max_length=500 - ) + name = models.CharField(max_length=50) + verbose_description = models.CharField(max_length=500) def __str__(self): return self.name @@ -95,7 +76,7 @@ class ReusableContentSection(models.Model): block_slug = models.CharField( max_length=255, blank=True, - help_text="Only needed if special styling is involved: check with a developer. If in doubt, it's not needed" + help_text="Only needed if special styling is involved: check with a developer. If in doubt, it's not needed", ) panels = [ @@ -139,11 +120,7 @@ class InvestmentAtlasLandingPage( breadcrumbs_label = models.CharField(max_length=100) hero_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=False + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=False ) mobile_hero_image = models.ForeignKey( 'wagtailimages.Image', @@ -151,13 +128,13 @@ class InvestmentAtlasLandingPage( blank=True, on_delete=models.SET_NULL, related_name='+', - help_text='Dedicated image for use on small/mobile-screen rendering of the page' + help_text='Dedicated image for use on small/mobile-screen rendering of the page', ) hero_title = models.CharField( blank=False, null=False, max_length=150, - help_text='Distinct from the page title, this is the title text for the main hero' + help_text='Distinct from the page title, this is the title text for the main hero', ) hero_strapline = models.TextField( @@ -185,9 +162,7 @@ class InvestmentAtlasLandingPage( ( 'panel', investment_atlas_blocks.AtlasLandingPagePanelBlock( - help_text=( - "If 'Block slug' is set to 'with-regions-map', the panel will show the regions map" - ), + help_text=("If 'Block slug' is set to 'with-regions-map', the panel will show the regions map"), ), ), ], @@ -208,16 +183,16 @@ class InvestmentOpportunityListingPage( BaseInternationalPage, investment_atlas_panels.InvestmentOpportunityListingPagePanels, ): - parent_page_types = ['great_international.InvestmentAtlasLandingPage', ] + parent_page_types = [ + 'great_international.InvestmentAtlasLandingPage', + ] subpage_types = [ 'great_international.InvestmentOpportunityPage', ] # `title` comes from the base class breadcrumbs_label = models.CharField(max_length=50) - search_results_title = models.CharField( - max_length=255 - ) + search_results_title = models.CharField(max_length=255) hero_video = models.ForeignKey( 'wagtailmedia.Media', null=True, @@ -255,16 +230,11 @@ class RelatedSector(models.Model): null=True, blank=True, on_delete=models.SET_NULL, - related_name='+' + related_name='+', ) panels = [ - PageChooserPanel( - 'related_sector', - [ - 'great_international.InternationalInvestmentSectorPage' - ] - ), + PageChooserPanel('related_sector', ['great_international.InternationalInvestmentSectorPage']), ] class Meta: @@ -288,14 +258,11 @@ class RelatedSubSector(models.Model): null=True, blank=True, on_delete=models.SET_NULL, - related_name='+' + related_name='+', ) panels = [ - PageChooserPanel( - 'related_sub_sector', - ['great_international.InternationalInvestmentSubSectorPage'] - ), + PageChooserPanel('related_sub_sector', ['great_international.InternationalInvestmentSubSectorPage']), ] class Meta: @@ -339,7 +306,7 @@ class InvestmentOpportunityPage( on_delete=models.SET_NULL, related_name='+', blank=True, - help_text='Main page hero image, above the opportunity title' + help_text='Main page hero image, above the opportunity title', ) hero_video = models.ForeignKey( 'wagtailmedia.Media', @@ -351,10 +318,7 @@ class InvestmentOpportunityPage( strapline = models.CharField( max_length=200, blank=False, - help_text=( - 'A single sentence which directly brings to the direct opportunity ' - 'to the fore. 200 chars max.' - ) + help_text=('A single sentence which directly brings to the direct opportunity ' 'to the fore. 200 chars max.'), ) introduction = MarkdownField( blank=False, @@ -371,7 +335,7 @@ class InvestmentOpportunityPage( on_delete=models.SET_NULL, related_name='+', blank=True, - help_text='Goes beside the opportunity intro text' + help_text='Goes beside the opportunity intro text', ) intro_video = models.ForeignKey( 'wagtailmedia.Media', @@ -395,11 +359,10 @@ class InvestmentOpportunityPage( help_text=( 'Verbose display name for the location. ' 'Geospatial and region data is set in the Location and Relevant Regions tab.' - ) + ), ) - regions_with_locations = StreamField([ - ('location', investment_atlas_blocks.OpportunityLocationBlock()) - ], + regions_with_locations = StreamField( + [('location', investment_atlas_blocks.OpportunityLocationBlock())], use_json_field=True, null=True, blank=True, @@ -416,12 +379,7 @@ class InvestmentOpportunityPage( help_text='Verbose description of investment scale', ) scale_value = models.DecimalField( - default=0, - null=True, - blank=True, - max_digits=10, - decimal_places=2, - verbose_name="Scale value (in millions)" + default=0, null=True, blank=True, max_digits=10, decimal_places=2, verbose_name="Scale value (in millions)" ) # Note that a `related_sectors` reverse relation @@ -452,20 +410,18 @@ class InvestmentOpportunityPage( # The Opportunity main_content = StreamField( [ - ('content_section', investment_atlas_blocks.PageSectionBlock( - help_text=( - "If 'Block slug' is set to 'with-key-links', the 'Key links' " - "panel is shown next to the text. " - "If 'Block slug' is set to 'with-region-spotlight', " - "the 'Region spotlight' panel is shown next to the text." - ) - )), ( - 'snippet_content', - investment_atlas_blocks.ReusableSnippetChooserBlock( - ReusableContentSection - ) - ) + 'content_section', + investment_atlas_blocks.PageSectionBlock( + help_text=( + "If 'Block slug' is set to 'with-key-links', the 'Key links' " + "panel is shown next to the text. " + "If 'Block slug' is set to 'with-region-spotlight', " + "the 'Region spotlight' panel is shown next to the text." + ) + ), + ), + ('snippet_content', investment_atlas_blocks.ReusableSnippetChooserBlock(ReusableContentSection)), ], use_json_field=True, null=True, @@ -483,11 +439,7 @@ class InvestmentOpportunityPage( blank=True, ) contact_avatar = models.ForeignKey( - 'wagtailimages.Image', - null=True, - on_delete=models.SET_NULL, - related_name='+', - blank=True + 'wagtailimages.Image', null=True, on_delete=models.SET_NULL, related_name='+', blank=True ) contact_job_title = models.CharField( max_length=255, @@ -503,7 +455,7 @@ class InvestmentOpportunityPage( choices=GET_RELATED_OPPORTUNITIES_OPTIONS, default=RELATED_SECTORS, help_text='Used to determine what related opportunities are dislayed on the page.', - max_length=50 + max_length=50, ) @@ -511,7 +463,9 @@ class InvestmentGeneralContentPage( investment_atlas_panels.InvestmentGeneralContentPagePanels, BaseInternationalPage, ): - parent_page_types = ['great_international.InvestmentAtlasLandingPage', ] + parent_page_types = [ + 'great_international.InvestmentAtlasLandingPage', + ] subpage_types = [ 'great_international.InvestmentGeneralContentPage', 'great_international.InternationalArticlePage', @@ -524,7 +478,7 @@ class InvestmentGeneralContentPage( on_delete=models.SET_NULL, related_name='+', blank=True, - help_text='Main page hero image, above the opportunity title' + help_text='Main page hero image, above the opportunity title', ) hero_video = models.ForeignKey( 'wagtailmedia.Media', @@ -534,11 +488,7 @@ class InvestmentGeneralContentPage( related_name='+', ) strapline = models.CharField( - max_length=200, - blank=False, - help_text=( - 'A single sentence which goes beneath the page title' - ) + max_length=200, blank=False, help_text=('A single sentence which goes beneath the page title') ) introduction = MarkdownField( blank=False, @@ -549,7 +499,7 @@ class InvestmentGeneralContentPage( on_delete=models.SET_NULL, related_name='+', blank=True, - help_text='Goes beside the opportunity intro text' + help_text='Goes beside the opportunity intro text', ) main_content = single_struct_block_stream_field_factory( @@ -591,12 +541,8 @@ class ForeignDirectInvestmentFormPage( content_panels_before_form = ( investment_atlas_panels.ForeignDirectInvestmentFormPagePanels.content_panels_before_form ) - content_panels_after_form = ( - investment_atlas_panels.ForeignDirectInvestmentFormPagePanels.content_panels_after_form - ) - settings_panels = ( - investment_atlas_panels.ForeignDirectInvestmentFormPagePanels.settings_panels - ) + content_panels_after_form = investment_atlas_panels.ForeignDirectInvestmentFormPagePanels.content_panels_after_form + settings_panels = investment_atlas_panels.ForeignDirectInvestmentFormPagePanels.settings_panels class ForeignDirectInvestmentFormSuccessPage( @@ -609,27 +555,18 @@ class ForeignDirectInvestmentFormSuccessPage( parent_page_types = ['ForeignDirectInvestmentFormPage'] breadcrumbs_label = models.CharField(max_length=50) - heading = models.CharField( - max_length=255, - verbose_name='section title' - ) + heading = models.CharField(max_length=255, verbose_name='section title') sub_heading = models.CharField( max_length=255, verbose_name='section body', ) - next_steps_title = models.CharField( - max_length=255, - verbose_name='section title' - ) + next_steps_title = models.CharField(max_length=255, verbose_name='section title') next_steps_body = models.CharField( max_length=255, verbose_name='section body', ) # These are deprecated / unused for the time being - documents_title = models.CharField( - max_length=255, - verbose_name='section title' - ) + documents_title = models.CharField(max_length=255, verbose_name='section title') documents_body = models.CharField( max_length=255, verbose_name='section body', diff --git a/pii-secret-exclude.txt b/pii-secret-exclude.txt index e69de29b..d0e69752 100644 --- a/pii-secret-exclude.txt +++ b/pii-secret-exclude.txt @@ -0,0 +1,2 @@ +requirements.txt +requirements_test.txt diff --git a/requirements.in b/requirements.in index 6a1de019..8c7ce429 100644 --- a/requirements.in +++ b/requirements.in @@ -22,10 +22,11 @@ celery[redis] django-celery-beat==2.5.0 kombu==5.3.1 requests[security]>=2.31.0 -markdown==2.* +markdown==3.* bleach==3.* bleach-whitelist==0.* wagtail==4.1.5 +wagtail-markdown==0.11 wagtail-modeltranslation==0.13.* django-modeltranslation==0.18.* urllib3==1.26.* diff --git a/requirements.txt b/requirements.txt index 1fa258fd..ffe28e3d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,9 @@ beautifulsoup4==4.11.2 billiard==4.1.0 # via celery bleach==3.3.1 - # via -r requirements.in + # via + # -r requirements.in + # wagtail-markdown bleach-whitelist==0.0.11 # via -r requirements.in boto3==1.24.96 @@ -43,9 +45,9 @@ certifi==2023.5.7 # sentry-sdk cffi==1.15.1 # via cryptography -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via requests -click==8.1.3 +click==8.1.6 # via # celery # click-didyoumean @@ -59,11 +61,11 @@ click-repl==0.3.0 # via celery cron-descriptor==1.4.0 # via django-celery-beat -cryptography==41.0.1 +cryptography==41.0.2 # via -r requirements.in directory-components==39.1.2 # via -r requirements.in -directory-constants==23.1.0 +directory-constants==23.1.1 # via # -r requirements.in # directory-components @@ -108,7 +110,7 @@ django-health-check==3.17.0 # via directory-healthcheck django-modelcluster==6.0 # via wagtail -django-modeltranslation==0.18.10 +django-modeltranslation==0.18.11 # via # -r requirements.in # wagtail-modeltranslation @@ -144,7 +146,7 @@ drf-spectacular==0.26.3 # via -r requirements.in ecs-logging==2.0.2 # via elastic-apm -elastic-apm==6.16.2 +elastic-apm==6.17.0 # via -r requirements.in et-xmlfile==1.1.0 # via openpyxl @@ -160,6 +162,8 @@ html5lib==1.1 # via wagtail idna==3.4 # via requests +importlib-metadata==6.8.0 + # via markdown inflection==0.5.1 # via drf-spectacular jmespath==1.0.1 @@ -176,8 +180,10 @@ kombu==5.3.1 # celery l18n==2021.3 # via wagtail -markdown==2.6.11 - # via -r requirements.in +markdown==3.4.3 + # via + # -r requirements.in + # wagtail-markdown mohawk==1.1.0 # via sigauth notifications-python-client==6.3.0 @@ -194,7 +200,7 @@ packaging==23.1 # via bleach pillow==9.5.0 # via wagtail -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.39 # via click-repl psycogreen==1.0.2 # via -r requirements.in @@ -204,11 +210,11 @@ pycountry==19.8.18 # via -r requirements.in pycparser==2.21 # via cffi -pyjwt==2.7.0 +pyjwt==2.8.0 # via notifications-python-client pyrsistent==0.19.3 # via jsonschema -python-crontab==2.7.1 +python-crontab==3.0.0 # via django-celery-beat python-dateutil==2.8.2 # via @@ -223,7 +229,7 @@ pytz==2023.3 # django-timezone-field # djangorestframework # l18n -pyyaml==6.0 +pyyaml==6.0.1 # via drf-spectacular redis==4.6.0 # via @@ -239,7 +245,7 @@ requests-oauthlib==1.3.1 # via django-staff-sso-client s3transfer==0.6.1 # via boto3 -sentry-sdk==1.26.0 +sentry-sdk==1.28.1 # via -r requirements.in sigauth==5.2.0 # via -r requirements.in @@ -259,7 +265,7 @@ sqlparse==0.4.4 # via django telepath==0.3.1 # via wagtail -typing-extensions==4.7.0 +typing-extensions==4.7.1 # via # asgiref # dj-database-url @@ -283,13 +289,16 @@ vine==5.0.0 # amqp # celery # kombu -w3lib==1.22 +w3lib==1.22.0 # via -r requirements.in wagtail==4.1.5 # via # -r requirements.in + # wagtail-markdown # wagtail-modeltranslation # wagtailmedia +wagtail-markdown==0.11.0 + # via -r requirements.in wagtail-modeltranslation==0.13.0 # via -r requirements.in wagtailmedia==0.14.2 @@ -306,6 +315,8 @@ willow==1.4.1 # via wagtail wrapt==1.15.0 # via elastic-apm +zipp==3.16.2 + # via importlib-metadata zope-event==5.0 # via gevent zope-interface==6.0 diff --git a/requirements_test.txt b/requirements_test.txt index 6039b6cd..2932b635 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -23,7 +23,9 @@ beautifulsoup4==4.11.2 billiard==4.1.0 # via celery bleach==3.3.1 - # via -r requirements.in + # via + # -r requirements.in + # wagtail-markdown bleach-whitelist==0.0.11 # via -r requirements.in boto3==1.24.96 @@ -45,9 +47,9 @@ certifi==2023.5.7 # sentry-sdk cffi==1.15.1 # via cryptography -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via requests -click==8.1.3 +click==8.1.6 # via # celery # click-didyoumean @@ -69,11 +71,11 @@ coveralls==3.3.1 # via -r requirements_test.in cron-descriptor==1.4.0 # via django-celery-beat -cryptography==41.0.1 +cryptography==41.0.2 # via -r requirements.in directory-components==39.1.2 # via -r requirements.in -directory-constants==23.1.0 +directory-constants==23.1.1 # via # -r requirements.in # directory-components @@ -121,7 +123,7 @@ django-health-check==3.17.0 # via directory-healthcheck django-modelcluster==6.0 # via wagtail -django-modeltranslation==0.18.10 +django-modeltranslation==0.18.11 # via # -r requirements.in # wagtail-modeltranslation @@ -158,17 +160,17 @@ drf-spectacular==0.26.3 # via -r requirements.in ecs-logging==2.0.2 # via elastic-apm -elastic-apm==6.16.2 +elastic-apm==6.17.0 # via -r requirements.in et-xmlfile==1.1.0 # via openpyxl -exceptiongroup==1.1.1 +exceptiongroup==1.1.2 # via pytest factory-boy==2.12.0 # via # -r requirements_test.in # wagtail-factories -faker==18.11.2 +faker==19.1.0 # via factory-boy flake8==6.0.0 # via -r requirements_test.in @@ -178,7 +180,7 @@ gevent==22.10.2 # via -r requirements.in gitdb==4.0.10 # via gitpython -gitpython==3.1.31 +gitpython==3.1.32 # via -r requirements_test.in greenlet==2.0.2 # via gevent @@ -190,6 +192,8 @@ html5lib==1.1 # via wagtail idna==3.4 # via requests +importlib-metadata==6.8.0 + # via markdown inflection==0.5.1 # via drf-spectacular iniconfig==2.0.0 @@ -208,8 +212,10 @@ kombu==5.3.1 # celery l18n==2021.3 # via wagtail -markdown==2.6.11 - # via -r requirements.in +markdown==3.4.3 + # via + # -r requirements.in + # wagtail-markdown mccabe==0.7.0 # via flake8 mohawk==1.1.0 @@ -232,11 +238,11 @@ packaging==23.1 # pytest-sugar pillow==9.5.0 # via wagtail -pip-tools==6.13.0 +pip-tools==7.1.0 # via -r requirements_test.in pluggy==1.2.0 # via pytest -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.39 # via click-repl psycogreen==1.0.2 # via -r requirements.in @@ -250,7 +256,7 @@ pycparser==2.21 # via cffi pyflakes==3.0.1 # via flake8 -pyjwt==2.7.0 +pyjwt==2.8.0 # via notifications-python-client pyproject-hooks==1.0.0 # via build @@ -273,7 +279,7 @@ pytest-django==4.5.2 # via -r requirements_test.in pytest-sugar==0.9.7 # via -r requirements_test.in -python-crontab==2.7.1 +python-crontab==3.0.0 # via django-celery-beat python-dateutil==2.8.2 # via @@ -290,7 +296,7 @@ pytz==2023.3 # django-timezone-field # djangorestframework # l18n -pyyaml==6.0 +pyyaml==6.0.1 # via drf-spectacular redis==4.6.0 # via @@ -311,7 +317,7 @@ requests-oauthlib==1.3.1 # via django-staff-sso-client s3transfer==0.6.1 # via boto3 -sentry-sdk==1.26.0 +sentry-sdk==1.28.1 # via -r requirements.in sigauth==5.2.0 # via -r requirements.in @@ -343,9 +349,10 @@ tomli==2.0.1 # via # build # coverage + # pip-tools # pyproject-hooks # pytest -typing-extensions==4.7.0 +typing-extensions==4.7.1 # via # asgiref # dj-database-url @@ -369,16 +376,19 @@ vine==5.0.0 # amqp # celery # kombu -w3lib==1.22 +w3lib==1.22.0 # via -r requirements.in wagtail==4.1.5 # via # -r requirements.in # wagtail-factories + # wagtail-markdown # wagtail-modeltranslation # wagtailmedia wagtail-factories==2.0.1 # via -r requirements_test.in +wagtail-markdown==0.11.0 + # via -r requirements.in wagtail-modeltranslation==0.13.0 # via -r requirements.in wagtailmedia==0.14.2 @@ -397,6 +407,8 @@ willow==1.4.1 # via wagtail wrapt==1.15.0 # via elastic-apm +zipp==3.16.2 + # via importlib-metadata zope-event==5.0 # via gevent zope-interface==6.0