From 87a4d66198ac95e93c5ae9a4cd3b8e844261c6e2 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 10 Feb 2023 13:34:01 +0000 Subject: [PATCH] Upgrade to 4 --- .../migrations/0025_wagtail_4_upgrade.py | 22 +++++++++++++++++++ network-api/networkapi/mozfest/models.py | 1 + requirements.in | 2 +- requirements.txt | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 network-api/networkapi/mozfest/migrations/0025_wagtail_4_upgrade.py diff --git a/network-api/networkapi/mozfest/migrations/0025_wagtail_4_upgrade.py b/network-api/networkapi/mozfest/migrations/0025_wagtail_4_upgrade.py new file mode 100644 index 000000000..63f770c6f --- /dev/null +++ b/network-api/networkapi/mozfest/migrations/0025_wagtail_4_upgrade.py @@ -0,0 +1,22 @@ +# Generated by Django 3.2.16 on 2023-02-10 12:09 + +from django.db import migrations +import networkapi.wagtailpages.pagemodels.customblocks.video_block +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('mozfest', '0024_wagtail_3_upgrade'), + ] + + operations = [ + migrations.AlterField( + model_name='mozfesthomepage', + name='banner_video', + field=wagtail.fields.StreamField([('CMS_video', networkapi.wagtailpages.pagemodels.customblocks.video_block.WagtailVideoChooserBlock()), ('external_video', wagtail.blocks.StructBlock([('video_url', wagtail.blocks.URLBlock(help_text='For YouTube: go to your YouTube video and click “Share,” then “Embed,” and then copy and paste the provided URL only. For example: https://www.youtube.com/embed/3FIVXBawyQw For Vimeo: follow similar steps to grab the embed URL. For example: https://player.vimeo.com/video/9004979')), ('thumbnail', wagtail.images.blocks.ImageChooserBlock(help_text='The image to show before the video is played.'))]))], blank=True, help_text='The video to play when users click "Watch Video". This is only shown on the new Hero.', null=True, use_json_field=True), + ), + ] diff --git a/network-api/networkapi/mozfest/models.py b/network-api/networkapi/mozfest/models.py index a49d87083..d7aa3ac95 100644 --- a/network-api/networkapi/mozfest/models.py +++ b/network-api/networkapi/mozfest/models.py @@ -211,6 +211,7 @@ class MozfestHomepage(MozfestPrimaryPage): help_text='The video to play when users click "Watch Video". This is ' "only shown on the new Hero.", blank=True, null=True, + use_json_field=True, ) subpage_types = [ diff --git a/requirements.in b/requirements.in index 7536d81a2..ddf3e35c8 100644 --- a/requirements.in +++ b/requirements.in @@ -24,7 +24,7 @@ pygit2==1.11.1 python-slugify requests social-auth-app-django -wagtail==3.0.3 +wagtail==4.0 wagtail-color-panel wagtail-factories wagtail-localize==1.3.3 diff --git a/requirements.txt b/requirements.txt index 09997c3ec..028c71715 100644 --- a/requirements.txt +++ b/requirements.txt @@ -233,7 +233,7 @@ urllib3[secure]==1.26.8 # requests # scout-apm # sentry-sdk -wagtail==3.0.3 +wagtail==4.0 # via # -r requirements.in # wagtail-color-panel