From 108cfa4d8e65d20d50ce58980b50a1e9e3c127f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 10:53:38 +0000 Subject: [PATCH 01/20] Bump requests from 2.24.0 to 2.31.0 Bumps [requests](https://github.com/psf/requests) from 2.24.0 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.24.0...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index 046610c1f..f2c5d1b10 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -20,7 +20,7 @@ google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==1.0.0 django-environ==0.4.5 -requests==2.24.0 +requests==2.31.0 whitenoise==5.1.0 brotli==1.0.9 django-extensions==3.1.3 diff --git a/requirements.txt b/requirements.txt index 7dadb470e..f74cc82dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==2.11.0 django-environ==0.4.5 -requests==2.24.0 +requests==2.31.0 whitenoise==5.1.0 brotli==1.0.9 django-extensions==3.1.3 From 0c839ea355d15c5cd9bc0cf2bfec4e73cb74e2a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:16:54 +0000 Subject: [PATCH 02/20] Bump django-extensions from 3.1.3 to 3.2.3 Bumps [django-extensions](https://github.com/django-extensions/django-extensions) from 3.1.3 to 3.2.3. - [Release notes](https://github.com/django-extensions/django-extensions/releases) - [Changelog](https://github.com/django-extensions/django-extensions/blob/main/CHANGELOG.md) - [Commits](https://github.com/django-extensions/django-extensions/compare/3.1.3...3.2.3) --- updated-dependencies: - dependency-name: django-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..1ee8dbe1a 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -23,7 +23,7 @@ django-environ==0.4.5 requests==2.24.0 whitenoise==5.1.0 brotli==1.0.9 -django-extensions==3.1.3 +django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates wagtail-modelchooser==2.13.1 wagtailmenus==3.0.2 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..18190dda4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,7 @@ django-environ==0.4.5 requests==2.24.0 whitenoise==5.1.0 brotli==1.0.9 -django-extensions==3.1.3 +django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates wagtail-modelchooser==2.13.1 wagtailmenus==3.0.2 From 27d524852e2bd3b667d8548a5b54844dad7464b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:01 +0000 Subject: [PATCH 03/20] Bump wagtail-modelchooser from 2.13.1 to 4.0.1 Bumps [wagtail-modelchooser](https://github.com/takeflight/wagtailmodelchooser) from 2.13.1 to 4.0.1. - [Commits](https://github.com/takeflight/wagtailmodelchooser/compare/2.13.1...4.0.1) --- updated-dependencies: - dependency-name: wagtail-modelchooser dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..ba564cae8 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -25,7 +25,7 @@ whitenoise==5.1.0 brotli==1.0.9 django-extensions==3.1.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates -wagtail-modelchooser==2.13.1 +wagtail-modelchooser==4.0.1 wagtailmenus==3.0.2 wagtail-cache==1.0.2 google-crc32c==1.3.0 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..86746076b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,7 @@ whitenoise==5.1.0 brotli==1.0.9 django-extensions==3.1.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates -wagtail-modelchooser==2.13.1 +wagtail-modelchooser==4.0.1 wagtailmenus==3.0.2 wagtail-cache==1.0.2 google-crc32c==1.3.0 From fb64bc456b5dc190da5933bcf9ba0fdab4d001bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:38 +0000 Subject: [PATCH 04/20] Bump gunicorn from 20.0.4 to 21.2.0 Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.4 to 21.2.0. - [Release notes](https://github.com/benoitc/gunicorn/releases) - [Commits](https://github.com/benoitc/gunicorn/compare/20.0.4...21.2.0) --- updated-dependencies: - dependency-name: gunicorn dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..8088dc8ba 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -14,7 +14,7 @@ pyyaml==5.4 ua-parser==0.10.0 user-agents==2.2.0 django-user_agents==0.4.0 -gunicorn==20.0.4 +gunicorn==21.2.0 Pillow==9.3.0 google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..e06c9f722 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ pyyaml==5.4 ua-parser==0.10.0 user-agents==2.2.0 django-user_agents==0.4.0 -gunicorn==20.0.4 +gunicorn==21.2.0 Pillow==9.3.0 google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 From 96a167005f36fc879ade4de411367f4c90ac4e1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:42 +0000 Subject: [PATCH 05/20] Bump pymemcache from 3.5.0 to 4.0.0 Bumps [pymemcache](https://github.com/pinterest/pymemcache) from 3.5.0 to 4.0.0. - [Release notes](https://github.com/pinterest/pymemcache/releases) - [Changelog](https://github.com/pinterest/pymemcache/blob/master/ChangeLog.rst) - [Commits](https://github.com/pinterest/pymemcache/compare/v3.5.0...v4.0.0) --- updated-dependencies: - dependency-name: pymemcache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..1a6b255f3 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -4,7 +4,7 @@ wagtail==2.15.3 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 django-canonical-domain==0.3.0 -pymemcache==3.5.0 +pymemcache==4.0.0 mysqlclient==2.0.1 django-phonenumber-field==2.0.0 phonenumbers==8.12.9 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..fb94338ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ wagtail==2.15.3 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 django-canonical-domain==0.3.0 -pymemcache==3.5.0 +pymemcache==4.0.0 mysqlclient==2.0.1 django-phonenumber-field==2.0.0 phonenumbers==8.12.9 From cd17fab92e4d4c0dc41054c19af5bf8f6cdd7dbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:46 +0000 Subject: [PATCH 06/20] Bump django from 3.2.11 to 4.2.4 Bumps [django](https://github.com/django/django) from 3.2.11 to 4.2.4. - [Commits](https://github.com/django/django/compare/3.2.11...4.2.4) --- updated-dependencies: - dependency-name: django dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..cbd375321 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -1,5 +1,5 @@ dispatch==2.0.6 -Django==3.2.11 +Django==4.2.4 wagtail==2.15.3 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..bfdf07a86 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ dispatch==2.0.6 -Django==3.2.11 +Django==4.2.4 wagtail==2.15.3 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 From 8dd8c2f5fd703891c473d23991c4ff78d1c73f91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:49 +0000 Subject: [PATCH 07/20] Bump whitenoise from 5.1.0 to 6.5.0 Bumps [whitenoise](https://github.com/evansd/whitenoise) from 5.1.0 to 6.5.0. - [Changelog](https://github.com/evansd/whitenoise/blob/main/docs/changelog.rst) - [Commits](https://github.com/evansd/whitenoise/compare/v5.1.0...6.5.0) --- updated-dependencies: - dependency-name: whitenoise dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..5038e0c59 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -21,7 +21,7 @@ google-cloud-storage==1.31.0 google-cloud-secret-manager==1.0.0 django-environ==0.4.5 requests==2.24.0 -whitenoise==5.1.0 +whitenoise==6.5.0 brotli==1.0.9 django-extensions==3.1.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates diff --git a/requirements.txt b/requirements.txt index 2b820d89d..aaac01623 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ google-cloud-storage==1.31.0 google-cloud-secret-manager==2.11.0 django-environ==0.4.5 requests==2.24.0 -whitenoise==5.1.0 +whitenoise==6.5.0 brotli==1.0.9 django-extensions==3.1.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates From 8ae0e52c666e2a854fdb6258376c0d7e86f98119 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:55 +0000 Subject: [PATCH 08/20] Bump beautifulsoup4 from 4.8.2 to 4.12.2 Bumps [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/bs4/) from 4.8.2 to 4.12.2. --- updated-dependencies: - dependency-name: beautifulsoup4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..f2faa2a9b 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -8,7 +8,7 @@ pymemcache==3.5.0 mysqlclient==2.0.1 django-phonenumber-field==2.0.0 phonenumbers==8.12.9 -beautifulsoup4==4.8.2 +beautifulsoup4==4.12.2 feedparser==6.0.1 pyyaml==5.4 ua-parser==0.10.0 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..7dd7cf6a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ pymemcache==3.5.0 mysqlclient==2.0.1 django-phonenumber-field==2.0.0 phonenumbers==8.12.9 -beautifulsoup4==4.8.2 +beautifulsoup4==4.12.2 feedparser==6.0.1 pyyaml==5.4 ua-parser==0.10.0 From 57455b39833a23fda24ca2e211bdce392e3d4f4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:17:58 +0000 Subject: [PATCH 09/20] Bump google-cloud-datastore from 1.15.0 to 2.17.0 Bumps [google-cloud-datastore](https://github.com/googleapis/python-datastore) from 1.15.0 to 2.17.0. - [Release notes](https://github.com/googleapis/python-datastore/releases) - [Changelog](https://github.com/googleapis/python-datastore/blob/main/CHANGELOG.md) - [Commits](https://github.com/googleapis/python-datastore/compare/v1.15.0...v2.17.0) --- updated-dependencies: - dependency-name: google-cloud-datastore dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..9d24526d0 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -16,7 +16,7 @@ user-agents==2.2.0 django-user_agents==0.4.0 gunicorn==20.0.4 Pillow==9.3.0 -google-cloud-datastore==1.15.0 +google-cloud-datastore==2.17.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==1.0.0 django-environ==0.4.5 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..96ba5e303 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ user-agents==2.2.0 django-user_agents==0.4.0 gunicorn==20.0.4 Pillow==9.3.0 -google-cloud-datastore==1.15.0 +google-cloud-datastore==2.17.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==2.11.0 django-environ==0.4.5 From 87321b1fd933d962ead6a34ebb73c655e57b788c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:31:39 +0000 Subject: [PATCH 10/20] Bump wagtail from 2.15.3 to 5.1.1 Bumps [wagtail](https://github.com/wagtail/wagtail) from 2.15.3 to 5.1.1. - [Release notes](https://github.com/wagtail/wagtail/releases) - [Changelog](https://github.com/wagtail/wagtail/blob/main/CHANGELOG.txt) - [Commits](https://github.com/wagtail/wagtail/compare/v2.15.3...v5.1.1) --- updated-dependencies: - dependency-name: wagtail dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d258725f3..7070ffe55 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -1,6 +1,6 @@ dispatch==2.0.6 Django==3.2.11 -wagtail==2.15.3 +wagtail==5.1.1 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 django-canonical-domain==0.3.0 diff --git a/requirements.txt b/requirements.txt index 2b820d89d..ff6009c14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ dispatch==2.0.6 Django==3.2.11 -wagtail==2.15.3 +wagtail==5.1.1 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 django-canonical-domain==0.3.0 From dd16c89f168ebc01c170b4cba2b14c34de240a71 Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Tue, 15 Aug 2023 11:30:11 +0000 Subject: [PATCH 11/20] Wagtail modelchooser need wagtail to be 4.0.0 up --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index 50d095a0a..ddc50df5a 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -25,7 +25,7 @@ whitenoise==5.1.0 brotli==1.0.9 django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates -wagtail-modelchooser==4.0.1 +wagtail-modelchooser==2.13.1 wagtailmenus==3.0.2 wagtail-cache==1.0.2 google-crc32c==1.3.0 diff --git a/requirements.txt b/requirements.txt index 36984832d..791d4c4f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,7 @@ whitenoise==5.1.0 brotli==1.0.9 django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates -wagtail-modelchooser==4.0.1 +wagtail-modelchooser==2.13.1 wagtailmenus==3.0.2 wagtail-cache==1.0.2 google-crc32c==1.3.0 From ccd3264c34f3c344a2603bd4f5c4d493e6f1a50d Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Tue, 15 Aug 2023 11:40:32 +0000 Subject: [PATCH 12/20] Removed unneccesary dispatch filters in templates --- article/templates/article/objects/author_pinned.html | 1 - article/templates/article/objects/cover_story.html | 1 - 2 files changed, 2 deletions(-) diff --git a/article/templates/article/objects/author_pinned.html b/article/templates/article/objects/author_pinned.html index c6c7e3670..5f276565e 100644 --- a/article/templates/article/objects/author_pinned.html +++ b/article/templates/article/objects/author_pinned.html @@ -1,4 +1,3 @@ -{% load dispatch_filters %} {% load wagtailcore_tags %} {% load wagtailimages_tags %} {% load humanize %} diff --git a/article/templates/article/objects/cover_story.html b/article/templates/article/objects/cover_story.html index 0b4a07c20..9e18161b8 100644 --- a/article/templates/article/objects/cover_story.html +++ b/article/templates/article/objects/cover_story.html @@ -1,5 +1,4 @@ {% load humanize %} -{% load dispatch_filters %} {% load wagtailcore_tags %} {% load wagtailimages_tags %} {% load articletags %} From fa740d16a25a0900a583d3965c7921d7853a4a14 Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Tue, 15 Aug 2023 13:14:10 +0000 Subject: [PATCH 13/20] Merge of dependabot/pip/wagtail-5.1.1 into Test-python-packages-Akshanjay --- requirements-prd.txt | 1 - requirements.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index 823909991..5c14ac52d 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -1,4 +1,3 @@ -dispatch==2.0.6 Django==4.2.4 wagtail==2.15.3 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated diff --git a/requirements.txt b/requirements.txt index 910485411..13e7e0121 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -dispatch==2.0.6 Django==4.2.4 wagtail==2.15.3 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated From 70370ae6d82a9d5f7f17d52579537693a55fa476 Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 05:11:11 +0000 Subject: [PATCH 14/20] Updated all the imports to wagtail 3.0 --- ads/models.py | 4 ++-- archive/models.py | 4 ++-- article/blocks.py | 4 ++-- article/migrations/0001_initial.py | 6 +++--- ...0014_specialarticlelikepage_right_column_content.py | 6 +++--- article/migrations/0019_alter_articlepage_content.py | 6 +++--- article/migrations/0020_alter_articlepage_content.py | 6 +++--- article/models.py | 8 ++++---- article/signals.py | 2 +- authors/migrations/0006_authorpage_links.py | 6 +++--- authors/migrations/0007_authorpage_linkicons.py | 6 +++--- authors/migrations/0008_alter_authorpage_linkicons.py | 6 +++--- .../0008_alter_authorpage_short_bio_description.py | 6 +++--- .../0009_alter_authorpage_bio_description.py | 6 +++--- authors/migrations/0009_alter_authorpage_linkicons.py | 6 +++--- authors/models.py | 8 ++++---- config/settings/base.py | 2 +- dashboard/wagtail_hooks.py | 2 +- home/blocks.py | 4 ++-- home/migrations/0001_initial.py | 6 +++--- home/migrations/0004_auto_20220518_1747.py | 8 ++++---- home/migrations/0005_homepage_sidebar_stream.py | 6 +++--- .../migrations/0006_alter_homepage_above_cut_stream.py | 6 +++--- home/migrations/0007_auto_20220707_1618.py | 8 ++++---- home/migrations/0008_alter_homepage_sidebar_stream.py | 6 +++--- home/migrations/0009_alter_homepage_sidebar_stream.py | 6 +++--- home/migrations/0010_alter_homepage_sidebar_stream.py | 6 +++--- home/migrations/0011_alter_homepage_sidebar_stream.py | 6 +++--- home/migrations/0012_alter_homepage_sidebar_stream.py | 6 +++--- home/migrations/0015_homepage_links.py | 6 +++--- home/migrations/0019_homepage_sections_stream.py | 6 +++--- home/migrations/0020_alter_homepage_sections_stream.py | 6 +++--- home/migrations/0021_alter_homepage_sidebar_stream.py | 6 +++--- home/models.py | 6 +++--- images/blocks.py | 2 +- images/migrations/0001_initial.py | 4 ++-- images/models.py | 6 +++--- infinitefeed/blocks.py | 6 +++--- navigation/models.py | 4 ++-- requirements-prd.txt | 10 +++++----- requirements.txt | 10 +++++----- section/migrations/0012_sectionpage_sidebar_stream.py | 6 +++--- section/models.py | 8 ++++---- section/sectionable/models.py | 4 ++-- specialfeaturelanding/blocks.py | 2 +- .../migrations/0004_speciallandingpage_content.py | 6 +++--- .../migrations/0005_auto_20210824_1800.py | 6 +++--- .../migrations/0007_auto_20220802_1754.py | 6 +++--- .../0008_alter_speciallandingpage_editorial_stream.py | 6 +++--- .../0009_speciallandingpage_graphical_menu.py | 6 +++--- .../0011_alter_speciallandingpage_editorial_stream.py | 6 +++--- .../0012_alter_speciallandingpage_editorial_stream.py | 6 +++--- .../0013_alter_speciallandingpage_editorial_stream.py | 6 +++--- .../0016_alter_speciallandingpage_editorial_stream.py | 6 +++--- .../0017_alter_speciallandingpage_editorial_stream.py | 6 +++--- .../0019_alter_speciallandingpage_editorial_stream.py | 6 +++--- specialfeaturelanding/models.py | 8 ++++---- specialfeaturelanding/snippets.py | 2 +- ubyssey/urls.py | 2 +- videos/blocks.py | 2 +- videos/models.py | 4 ++-- 61 files changed, 169 insertions(+), 169 deletions(-) diff --git a/ads/models.py b/ads/models.py index e90285cee..d48ec9ddf 100644 --- a/ads/models.py +++ b/ads/models.py @@ -1,8 +1,8 @@ from django.db import models from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel -from wagtail.admin.edit_handlers import TabbedInterface, ObjectList, MultiFieldPanel, HelpPanel, InlinePanel -from wagtail.core.models import Orderable +from wagtail.admin.panels import TabbedInterface, ObjectList, MultiFieldPanel, HelpPanel, InlinePanel +from wagtail.models import Orderable from wagtail.contrib.settings.models import BaseSetting, register_setting from wagtailmodelchooser import register_model_chooser from wagtailmodelchooser.edit_handlers import ModelChooserPanel diff --git a/archive/models.py b/archive/models.py index 4085f1e49..5467f6d96 100644 --- a/archive/models.py +++ b/archive/models.py @@ -9,9 +9,9 @@ from modelcluster.fields import ParentalKey from section.models import SectionPage -from wagtail.core.models import Page, Orderable +from wagtail.models import Page, Orderable from wagtail.snippets.edit_handlers import SnippetChooserPanel -from wagtail.admin.edit_handlers import MultiFieldPanel, InlinePanel, HelpPanel, PageChooserPanel +from wagtail.admin.panels import MultiFieldPanel, InlinePanel, HelpPanel, PageChooserPanel from wagtail.contrib.routable_page.models import RoutablePageMixin, route from videos.models import VideosPage, VideoSnippet diff --git a/article/blocks.py b/article/blocks.py index 2279daa05..b48fffe11 100644 --- a/article/blocks.py +++ b/article/blocks.py @@ -1,5 +1,5 @@ -from wagtail.core import blocks -from wagtail.core.blocks import field_block +from wagtail import blocks +from wagtail.blocks import field_block from images import blocks as image_blocks from videos import blocks as video_blocks from wagtail.documents.blocks import DocumentChooserBlock diff --git a/article/migrations/0001_initial.py b/article/migrations/0001_initial.py index ce1bf362d..29e1da67b 100644 --- a/article/migrations/0001_initial.py +++ b/article/migrations/0001_initial.py @@ -5,8 +5,8 @@ import django.utils.timezone import images.models import modelcluster.fields -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.embeds.blocks import wagtail.images.blocks import wagtail.snippets.blocks @@ -52,7 +52,7 @@ class Migration(migrations.Migration): fields=[ ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')), ('current_section', models.CharField(blank=True, default='', max_length=255)), - ('content', wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.core.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.core.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.core.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.core.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.CharBlock(required=False)), ('source', wagtail.core.blocks.CharBlock(required=False))], label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True)), + ('content', wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=False)), ('source', wagtail.blocks.CharBlock(required=False))], label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True)), ('explicit_published_at', models.DateTimeField(blank=True, help_text='Optional. Publication date which is explicitly shown to the reader. Articles are seperately date/timestamped for database use; if this field is blank front page etc. will display the database publication date.', null=True, verbose_name='Published At (Override)')), ('last_modified_at', models.DateTimeField(auto_now=True)), ('show_last_modified', models.BooleanField(default=False, help_text='Check this to alert readers the article has been revised since its publication.')), diff --git a/article/migrations/0014_specialarticlelikepage_right_column_content.py b/article/migrations/0014_specialarticlelikepage_right_column_content.py index c54a81a8b..10749bb38 100644 --- a/article/migrations/0014_specialarticlelikepage_right_column_content.py +++ b/article/migrations/0014_specialarticlelikepage_right_column_content.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-06-14 19:36 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='specialarticlelikepage', name='right_column_content', - field=wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block'))], blank=True, null=True), + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block'))], blank=True, null=True), ), ] diff --git a/article/migrations/0019_alter_articlepage_content.py b/article/migrations/0019_alter_articlepage_content.py index 2f946dab0..013fb3ce2 100644 --- a/article/migrations/0019_alter_articlepage_content.py +++ b/article/migrations/0019_alter_articlepage_content.py @@ -2,8 +2,8 @@ from django.db import migrations import images.models -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.embeds.blocks import wagtail.images.blocks import wagtail.snippets.blocks @@ -19,6 +19,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='articlepage', name='content', - field=wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.core.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.core.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.core.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.core.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.CharBlock(required=False)), ('source', wagtail.core.blocks.CharBlock(required=False))], icon='openquote', label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True), + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=False)), ('source', wagtail.blocks.CharBlock(required=False))], icon='openquote', label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True), ), ] \ No newline at end of file diff --git a/article/migrations/0020_alter_articlepage_content.py b/article/migrations/0020_alter_articlepage_content.py index 880f080e2..3b6bf8bdc 100644 --- a/article/migrations/0020_alter_articlepage_content.py +++ b/article/migrations/0020_alter_articlepage_content.py @@ -2,8 +2,8 @@ from django.db import migrations import images.models -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.documents.blocks import wagtail.embeds.blocks import wagtail.images.blocks @@ -20,6 +20,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='articlepage', name='content', - field=wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.core.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.core.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.core.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.core.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.CharBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='optional, must be mp3 format', required=False))])), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html')), ('header_link', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('id', wagtail.core.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('header_menu', wagtail.core.blocks.StructBlock([('list', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('id', wagtail.core.blocks.CharBlock(help_text='Intended to be shared with a header so that this button will send the user to the section of the page with said header')), ('colour', wagtail.core.blocks.CharBlock(default='0071c9'))], label='Page Link')))])), ('visual_essay', wagtail.core.blocks.StructBlock([('view', wagtail.core.blocks.StructBlock([('view', wagtail.core.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))])), ('content', wagtail.core.blocks.StreamBlock([('rich_text', wagtail.core.blocks.StructBlock([('block', wagtail.core.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('side', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='doc-full')), ('image', wagtail.core.blocks.StructBlock([('block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.core.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.core.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))])), ('side', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='image')), ('video', wagtail.core.blocks.StructBlock([('block', wagtail.core.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('side', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('raw_html', wagtail.core.blocks.StructBlock([('block', wagtail.core.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('side', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='code')), ('quote', wagtail.core.blocks.StructBlock([('block', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.CharBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='optional, must be mp3 format', required=False))])), ('side', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='openquote')), ('header_link', wagtail.core.blocks.StructBlock([('block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('id', wagtail.core.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('side', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='title')), ('gap', wagtail.core.blocks.StructBlock([('id', wagtail.core.blocks.CharBlock(required=False)), ('height', wagtail.core.blocks.IntegerBlock(default=0, min_value=0, required=True))])), ('switch_view', wagtail.core.blocks.StructBlock([('view', wagtail.core.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=True)), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='optional, must be mp3 format', required=False))])), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html')), ('header_link', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('header_menu', wagtail.blocks.StructBlock([('list', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a header so that this button will send the user to the section of the page with said header')), ('colour', wagtail.blocks.CharBlock(default='0071c9'))], label='Page Link')))])), ('visual_essay', wagtail.blocks.StructBlock([('view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))])), ('content', wagtail.blocks.StreamBlock([('rich_text', wagtail.blocks.StructBlock([('block', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='doc-full')), ('image', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='image')), ('video', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('raw_html', wagtail.blocks.StructBlock([('block', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='code')), ('quote', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=True)), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='optional, must be mp3 format', required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='openquote')), ('header_link', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='title')), ('gap', wagtail.blocks.StructBlock([('id', wagtail.blocks.CharBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(default=0, min_value=0, required=True))])), ('switch_view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))]))]))]))], blank=True, null=True), ), ] diff --git a/article/models.py b/article/models.py index 795a4854c..6c8d62427 100644 --- a/article/models.py +++ b/article/models.py @@ -32,7 +32,7 @@ from wagtail.contrib.routable_page.models import RoutablePageMixin, route from article import blocks as article_blocks -from wagtail.admin.edit_handlers import ( +from wagtail.admin.panels import ( # Panels FieldPanel, FieldRowPanel, @@ -46,9 +46,9 @@ TabbedInterface, ) -from wagtail.core import blocks -from wagtail.core.fields import StreamField -from wagtail.core.models import Page, PageManager, Orderable +from wagtail import blocks +from wagtail.fields import StreamField +from wagtail.models import Page, PageManager, Orderable from wagtail.documents.models import Document from wagtail.documents.blocks import DocumentChooserBlock from wagtail.documents.edit_handlers import DocumentChooserPanel diff --git a/article/signals.py b/article/signals.py index 06b2c601d..d91728b94 100644 --- a/article/signals.py +++ b/article/signals.py @@ -1,6 +1,6 @@ from django.db.models.signals import pre_save, post_save, post_delete from django.dispatch import receiver -from wagtail.core.signals import page_published +from wagtail.signals import page_published from .models import ArticlePage @receiver(page_published, sender=ArticlePage) diff --git a/authors/migrations/0006_authorpage_links.py b/authors/migrations/0006_authorpage_links.py index ff825cf57..c4aa71578 100644 --- a/authors/migrations/0006_authorpage_links.py +++ b/authors/migrations/0006_authorpage_links.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-05-17 03:58 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='authorpage', name='links', - field=wagtail.core.fields.StreamField([('url', wagtail.core.blocks.URLBlock(label='Url'))], blank=True), + field=wagtail.fields.StreamField([('url', wagtail.blocks.URLBlock(label='Url'))], blank=True), ), ] diff --git a/authors/migrations/0007_authorpage_linkicons.py b/authors/migrations/0007_authorpage_linkicons.py index 12bf54c5e..79af09c30 100644 --- a/authors/migrations/0007_authorpage_linkicons.py +++ b/authors/migrations/0007_authorpage_linkicons.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-05-30 23:47 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='authorpage', name='linkIcons', - field=wagtail.core.fields.StreamField([('raw_html', wagtail.core.blocks.RawHTMLBlock())], blank=True), + field=wagtail.fields.StreamField([('raw_html', wagtail.blocks.RawHTMLBlock())], blank=True), ), ] diff --git a/authors/migrations/0008_alter_authorpage_linkicons.py b/authors/migrations/0008_alter_authorpage_linkicons.py index d15921447..dd6b7ee8a 100644 --- a/authors/migrations/0008_alter_authorpage_linkicons.py +++ b/authors/migrations/0008_alter_authorpage_linkicons.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-05-31 00:17 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='authorpage', name='linkIcons', - field=wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock())], blank=True), + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock())], blank=True), ), ] diff --git a/authors/migrations/0008_alter_authorpage_short_bio_description.py b/authors/migrations/0008_alter_authorpage_short_bio_description.py index bb3263fa7..995d6de59 100644 --- a/authors/migrations/0008_alter_authorpage_short_bio_description.py +++ b/authors/migrations/0008_alter_authorpage_short_bio_description.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-06-21 05:05 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='authorpage', name='short_bio_description', - field=wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock(help_text='Customise your short bio here with links, bolds and italics!', label='Rich Text Block'))], blank=True, default=''), + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Customise your short bio here with links, bolds and italics!', label='Rich Text Block'))], blank=True, default=''), ), ] diff --git a/authors/migrations/0009_alter_authorpage_bio_description.py b/authors/migrations/0009_alter_authorpage_bio_description.py index ad36942fc..27f798072 100644 --- a/authors/migrations/0009_alter_authorpage_bio_description.py +++ b/authors/migrations/0009_alter_authorpage_bio_description.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-06-21 10:30 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='authorpage', name='bio_description', - field=wagtail.core.fields.StreamField([('richtext', wagtail.core.blocks.RichTextBlock(help_text='Customise your bio here with links, bolds and italics!', label='Rich Text Block'))], blank=True, default=''), + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Customise your bio here with links, bolds and italics!', label='Rich Text Block'))], blank=True, default=''), ), ] diff --git a/authors/migrations/0009_alter_authorpage_linkicons.py b/authors/migrations/0009_alter_authorpage_linkicons.py index 65c3da7e6..a8664b98f 100644 --- a/authors/migrations/0009_alter_authorpage_linkicons.py +++ b/authors/migrations/0009_alter_authorpage_linkicons.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-05-31 00:24 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='authorpage', name='linkIcons', - field=wagtail.core.fields.StreamField([('raw_html', wagtail.core.blocks.RawHTMLBlock())], blank=True), + field=wagtail.fields.StreamField([('raw_html', wagtail.blocks.RawHTMLBlock())], blank=True), ), ] diff --git a/authors/models.py b/authors/models.py index 208b34796..b6ed5cbcc 100644 --- a/authors/models.py +++ b/authors/models.py @@ -4,7 +4,7 @@ from django_extensions.db.fields import AutoSlugField from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from article.models import ArticlePage -from wagtail.admin.edit_handlers import ( +from wagtail.admin.panels import ( # Panels FieldPanel, FieldRowPanel, @@ -19,9 +19,9 @@ ) -from wagtail.core import blocks -from wagtail.core.fields import StreamField -from wagtail.core.models import Page, Orderable +from wagtail import blocks +from wagtail.fields import StreamField +from wagtail.models import Page, Orderable from wagtail.search import index from wagtail.images.edit_handlers import ImageChooserPanel from modelcluster.fields import ParentalKey diff --git a/config/settings/base.py b/config/settings/base.py index 6a87858be..576108dbb 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -168,7 +168,7 @@ 'wagtail.images', 'wagtail.search', 'wagtail.admin', - 'wagtail.core', + 'wagtail', 'wagtail.contrib.routable_page', 'wagtail.contrib.styleguide', diff --git a/dashboard/wagtail_hooks.py b/dashboard/wagtail_hooks.py index f2872f324..f2144d7b1 100644 --- a/dashboard/wagtail_hooks.py +++ b/dashboard/wagtail_hooks.py @@ -1,7 +1,7 @@ from django.utils.html import format_html from django.templatetags.static import static -from wagtail.core import hooks +from wagtail import hooks import wagtail.admin.rich_text.editors.draftail.features as draftail_features from wagtail.admin.rich_text.converters.html_to_contentstate import InlineStyleElementHandler diff --git a/home/blocks.py b/home/blocks.py index 9544e7ea9..8f699386e 100644 --- a/home/blocks.py +++ b/home/blocks.py @@ -6,8 +6,8 @@ from django.db.models import Q -from wagtail.core import blocks -from wagtail.core.blocks import field_block +from wagtail import blocks +from wagtail.blocks import field_block from wagtail.snippets.blocks import SnippetChooserBlock from wagtail.images.blocks import ImageChooserBlock diff --git a/home/migrations/0001_initial.py b/home/migrations/0001_initial.py index fdcc26b24..8c09ad0cb 100644 --- a/home/migrations/0001_initial.py +++ b/home/migrations/0001_initial.py @@ -2,8 +2,8 @@ from django.db import migrations, models import django.db.models.deletion -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -19,7 +19,7 @@ class Migration(migrations.Migration): name='HomePage', fields=[ ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')), - ('sections_stream', wagtail.core.fields.StreamField([('home_page_section_block', wagtail.core.blocks.StructBlock([('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True)), + ('sections_stream', wagtail.fields.StreamField([('home_page_section_block', wagtail.blocks.StructBlock([('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True)), ], options={ 'abstract': False, diff --git a/home/migrations/0004_auto_20220518_1747.py b/home/migrations/0004_auto_20220518_1747.py index 1d543298d..77bc6d7f2 100644 --- a/home/migrations/0004_auto_20220518_1747.py +++ b/home/migrations/0004_auto_20220518_1747.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-05-19 00:47 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,11 +15,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='homepage', name='above_cut_stream', - field=wagtail.core.fields.StreamField([('above_cut_block', wagtail.core.blocks.StructBlock([]))], blank=True, null=True), + field=wagtail.fields.StreamField([('above_cut_block', wagtail.blocks.StructBlock([]))], blank=True, null=True), ), migrations.AlterField( model_name='homepage', name='sections_stream', - field=wagtail.core.fields.StreamField([('home_page_section_block', wagtail.core.blocks.StructBlock([('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.core.blocks.ChoiceBlock(choices=[('news', '"News Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('home_page_section_block', wagtail.blocks.StructBlock([('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.blocks.ChoiceBlock(choices=[('news', '"News Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0005_homepage_sidebar_stream.py b/home/migrations/0005_homepage_sidebar_stream.py index b2320e9f7..eb9e85940 100644 --- a/home/migrations/0005_homepage_sidebar_stream.py +++ b/home/migrations/0005_homepage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-05-19 22:43 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtailmodelchooser.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([('ad_slot', wagtailmodelchooser.blocks.ModelChooserBlock(target_model='ads.adslot'))])), ('sidebar_issuu_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([('ad_slot', wagtailmodelchooser.blocks.ModelChooserBlock(target_model='ads.adslot'))])), ('sidebar_issuu_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0006_alter_homepage_above_cut_stream.py b/home/migrations/0006_alter_homepage_above_cut_stream.py index e3e5c80f3..ab956a6df 100644 --- a/home/migrations/0006_alter_homepage_above_cut_stream.py +++ b/home/migrations/0006_alter_homepage_above_cut_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-05-26 02:14 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtailmodelchooser.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='above_cut_stream', - field=wagtail.core.fields.StreamField([('above_cut_block', wagtail.core.blocks.StructBlock([('above_cut_ad_slot', wagtailmodelchooser.blocks.ModelChooserBlock(required=False, target_model='ads.adslot'))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('above_cut_block', wagtail.blocks.StructBlock([('above_cut_ad_slot', wagtailmodelchooser.blocks.ModelChooserBlock(required=False, target_model='ads.adslot'))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0007_auto_20220707_1618.py b/home/migrations/0007_auto_20220707_1618.py index 176ad4874..d99905d55 100644 --- a/home/migrations/0007_auto_20220707_1618.py +++ b/home/migrations/0007_auto_20220707_1618.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-07-07 23:18 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -31,11 +31,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='above_cut_stream', - field=wagtail.core.fields.StreamField([('above_cut_block', wagtail.core.blocks.StructBlock([]))], blank=True, null=True), + field=wagtail.fields.StreamField([('above_cut_block', wagtail.blocks.StructBlock([]))], blank=True, null=True), ), migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issuu_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issuu_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0008_alter_homepage_sidebar_stream.py b/home/migrations/0008_alter_homepage_sidebar_stream.py index 1b1131129..e8ee16ac5 100644 --- a/home/migrations/0008_alter_homepage_sidebar_stream.py +++ b/home/migrations/0008_alter_homepage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-08-04 01:42 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=True)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0009_alter_homepage_sidebar_stream.py b/home/migrations/0009_alter_homepage_sidebar_stream.py index e413dc51c..ce92d6053 100644 --- a/home/migrations/0009_alter_homepage_sidebar_stream.py +++ b/home/migrations/0009_alter_homepage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-08-04 01:58 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0010_alter_homepage_sidebar_stream.py b/home/migrations/0010_alter_homepage_sidebar_stream.py index 1b98d2ac3..0938111f1 100644 --- a/home/migrations/0010_alter_homepage_sidebar_stream.py +++ b/home/migrations/0010_alter_homepage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-04-04 00:26 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_image_link_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.core.blocks.URLBlock(required=False))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_image_link_block', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0011_alter_homepage_sidebar_stream.py b/home/migrations/0011_alter_homepage_sidebar_stream.py index 8dba380ac..d90f9c4e7 100644 --- a/home/migrations/0011_alter_homepage_sidebar_stream.py +++ b/home/migrations/0011_alter_homepage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-04-04 01:12 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream', wagtail.core.blocks.StreamBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('image_link', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream', wagtail.blocks.StreamBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('image_link', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0012_alter_homepage_sidebar_stream.py b/home/migrations/0012_alter_homepage_sidebar_stream.py index d9555e2c9..0e7ac740f 100644 --- a/home/migrations/0012_alter_homepage_sidebar_stream.py +++ b/home/migrations/0012_alter_homepage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-04-04 03:39 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.core.blocks.StreamBlock([('image_link', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.core.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.blocks.StreamBlock([('image_link', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0015_homepage_links.py b/home/migrations/0015_homepage_links.py index 93d0f38fe..535282a1b 100644 --- a/home/migrations/0015_homepage_links.py +++ b/home/migrations/0015_homepage_links.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-05-23 20:56 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='homepage', name='links', - field=wagtail.core.fields.StreamField([('link', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('url', wagtail.core.blocks.URLBlock(required=False)), ('description', wagtail.core.blocks.TextBlock(required=False))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('link', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('url', wagtail.blocks.URLBlock(required=False)), ('description', wagtail.blocks.TextBlock(required=False))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0019_homepage_sections_stream.py b/home/migrations/0019_homepage_sections_stream.py index ab3b6f95b..36b10fc2b 100644 --- a/home/migrations/0019_homepage_sections_stream.py +++ b/home/migrations/0019_homepage_sections_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-07-18 18:39 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='homepage', name='sections_stream', - field=wagtail.core.fields.StreamField([('home_page_section_block', wagtail.core.blocks.StructBlock([('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.core.blocks.ChoiceBlock(choices=[('news', '"News Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('home_page_section_block', wagtail.blocks.StructBlock([('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.blocks.ChoiceBlock(choices=[('news', '"News Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0020_alter_homepage_sections_stream.py b/home/migrations/0020_alter_homepage_sections_stream.py index 7cd3c1faf..a609628b5 100644 --- a/home/migrations/0020_alter_homepage_sections_stream.py +++ b/home/migrations/0020_alter_homepage_sections_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-07-18 20:06 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sections_stream', - field=wagtail.core.fields.StreamField([('home_page_section_block', wagtail.core.blocks.StructBlock([('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.core.blocks.ChoiceBlock(choices=[('bulleted', '"Bulleted Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('home_page_section_block', wagtail.blocks.StructBlock([('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.blocks.ChoiceBlock(choices=[('bulleted', '"Bulleted Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True), ), ] diff --git a/home/migrations/0021_alter_homepage_sidebar_stream.py b/home/migrations/0021_alter_homepage_sidebar_stream.py index 29e6b716c..d7dbd5611 100644 --- a/home/migrations/0021_alter_homepage_sidebar_stream.py +++ b/home/migrations/0021_alter_homepage_sidebar_stream.py @@ -2,8 +2,8 @@ from django.db import migrations import section.models -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks import wagtail.snippets.blocks @@ -18,6 +18,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='homepage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_category_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('category', wagtail.snippets.blocks.SnippetChooserBlock(section.models.CategorySnippet))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.core.blocks.StreamBlock([('image_link', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.core.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_category_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('category', wagtail.snippets.blocks.SnippetChooserBlock(section.models.CategorySnippet))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.blocks.StreamBlock([('image_link', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True), ), ] diff --git a/home/models.py b/home/models.py index 884e2b298..e0133c9d3 100644 --- a/home/models.py +++ b/home/models.py @@ -6,9 +6,9 @@ from django.utils import timezone from ads.models import AdSlot -from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, PageChooserPanel, MultiFieldPanel, InlinePanel -from wagtail.core.models import Page, Orderable -from wagtail.core.fields import StreamField +from wagtail.admin.panels import FieldPanel, StreamFieldPanel, PageChooserPanel, MultiFieldPanel, InlinePanel +from wagtail.models import Page, Orderable +from wagtail.fields import StreamField from wagtailmodelchooser.edit_handlers import ModelChooserPanel from modelcluster.fields import ParentalKey from infinitefeed import blocks as infinitefeedblocks diff --git a/images/blocks.py b/images/blocks.py index fdd4a47ee..7412c49ec 100644 --- a/images/blocks.py +++ b/images/blocks.py @@ -1,4 +1,4 @@ -from wagtail.core import blocks +from wagtail import blocks from wagtail.images.blocks import ImageChooserBlock class ImageBlock(blocks.StructBlock): diff --git a/images/migrations/0001_initial.py b/images/migrations/0001_initial.py index a195d2c1d..343d3ea33 100644 --- a/images/migrations/0001_initial.py +++ b/images/migrations/0001_initial.py @@ -5,7 +5,7 @@ import django.db.models.deletion import modelcluster.fields import taggit.managers -import wagtail.core.models +import wagtail.models import wagtail.images.models import wagtail.search.index @@ -56,7 +56,7 @@ class Migration(migrations.Migration): ('legacy_filename', models.TextField(blank=True, default='')), ('legacy_authors', models.TextField(blank=True, default='')), ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='authors.authorpage')), - ('collection', models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.collection', verbose_name='collection')), + ('collection', models.ForeignKey(default=wagtail.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.collection', verbose_name='collection')), ('tags', taggit.managers.TaggableManager(blank=True, help_text=None, through='taggit.TaggedItem', to='taggit.Tag', verbose_name='tags')), ('uploaded_by_user', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='uploaded by user')), ], diff --git a/images/models.py b/images/models.py index 30f909f11..f0b91e82e 100644 --- a/images/models.py +++ b/images/models.py @@ -9,9 +9,9 @@ from django.utils.translation import gettext_lazy as _ from modelcluster.models import ClusterableModel from modelcluster.fields import ParentalKey -from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel -from wagtail.core.models import Orderable -from wagtail.core.utils import string_to_ascii +from wagtail.admin.panels import FieldPanel, InlinePanel, MultiFieldPanel +from wagtail.models import Orderable +from wagtail.coreutils import string_to_ascii from wagtail.images.models import Image, AbstractImage, AbstractRendition from wagtail.images.edit_handlers import ImageChooserPanel from wagtail.snippets.models import register_snippet diff --git a/infinitefeed/blocks.py b/infinitefeed/blocks.py index a16e3395c..ce2cf33f7 100644 --- a/infinitefeed/blocks.py +++ b/infinitefeed/blocks.py @@ -1,6 +1,6 @@ -from wagtail.core import blocks -from wagtail.core.blocks import field_block -from wagtail.core.fields import StreamField +from wagtail import blocks +from wagtail.blocks import field_block +from wagtail.fields import StreamField from wagtail.images.blocks import ImageChooserBlock class SidebarAdvertisementBlock(blocks.StructBlock): diff --git a/navigation/models.py b/navigation/models.py index 2e9a2d3ab..e3660cd90 100644 --- a/navigation/models.py +++ b/navigation/models.py @@ -6,9 +6,9 @@ from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel from section.models import SectionPage -from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel, HelpPanel +from wagtail.admin.panels import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel, HelpPanel from wagtail.contrib.settings.models import BaseSetting, register_setting -from wagtail.core.models import Orderable +from wagtail.models import Orderable class NavigationMenuOrderable(Orderable): diff --git a/requirements-prd.txt b/requirements-prd.txt index 7568b0d02..4594df94d 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -1,5 +1,5 @@ -Django==4.2.4 -wagtail==5.1.1 +Django==3.2.11 +wagtail==3.0.0 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 django-canonical-domain==0.3.0 @@ -17,12 +17,12 @@ gunicorn==20.0.4 Pillow==9.3.0 google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 -google-cloud-secret-manager==1.0.0 +google-cloud-secret-manager==2.11.0 django-environ==0.4.5 -requests==2.31.0 +requests==2.24.0 whitenoise==5.1.0 brotli==1.0.9 -django-extensions==3.2.3 +django-extensions==3.1.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates wagtail-modelchooser==2.13.1 wagtailmenus==3.0.2 diff --git a/requirements.txt b/requirements.txt index 44ea66400..a17ae7774 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -Django==4.2.4 -wagtail==5.1.1 +Django==3.2.11 +wagtail==3.0.0 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated django-storages[google]==1.10 django-canonical-domain==0.3.0 @@ -19,10 +19,10 @@ google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==2.11.0 django-environ==0.4.5 -requests==2.31.0 +requests==2.24.0 whitenoise==5.1.0 brotli==1.0.9 -django-extensions==3.2.3 +django-extensions==3.1.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates wagtail-modelchooser==2.13.1 wagtailmenus==3.0.2 @@ -32,4 +32,4 @@ wagtail-color-panel==1.4.0 django-debug-toolbar==3.2.1 pylint==2.8.3 pylint-django==2.4.4 -ipython +ipython \ No newline at end of file diff --git a/section/migrations/0012_sectionpage_sidebar_stream.py b/section/migrations/0012_sectionpage_sidebar_stream.py index 8bd3969d2..90c892eec 100644 --- a/section/migrations/0012_sectionpage_sidebar_stream.py +++ b/section/migrations/0012_sectionpage_sidebar_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-05-25 04:16 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='sectionpage', name='sidebar_stream', - field=wagtail.core.fields.StreamField([('sidebar_advertisement_block', wagtail.core.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.core.blocks.StreamBlock([('issue', wagtail.core.blocks.StructBlock([('date', wagtail.core.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.core.blocks.BooleanBlock(required=False)), ('link', wagtail.core.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.core.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.core.blocks.StreamBlock([('image_link', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.core.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.blocks.StreamBlock([('image_link', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True), ), ] diff --git a/section/models.py b/section/models.py index aff383c67..1656a0cf1 100644 --- a/section/models.py +++ b/section/models.py @@ -14,10 +14,10 @@ from modelcluster.fields import ParentalKey from wagtail.images.edit_handlers import ImageChooserPanel -from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel, StreamFieldPanel -from wagtail.core.fields import StreamField -from wagtail.core import models as wagtail_core_models -from wagtail.core.models import Page +from wagtail.admin.panels import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel, StreamFieldPanel +from wagtail.fields import StreamField +from wagtail import models as wagtail_core_models +from wagtail.models import Page from wagtail.contrib.routable_page.models import route, RoutablePageMixin from wagtail.search import index from wagtail.snippets.edit_handlers import SnippetChooserPanel diff --git a/section/sectionable/models.py b/section/sectionable/models.py index eb26a4e9c..a10f3e60c 100644 --- a/section/sectionable/models.py +++ b/section/sectionable/models.py @@ -1,7 +1,7 @@ from xmlrpc.client import Boolean from django.db.models import fields -from wagtail.core import models -from wagtail.admin.edit_handlers import ( +from wagtail import models +from wagtail.admin.panels import ( # Panels FieldPanel, HelpPanel, diff --git a/specialfeaturelanding/blocks.py b/specialfeaturelanding/blocks.py index ed30003e6..21b2c44b5 100644 --- a/specialfeaturelanding/blocks.py +++ b/specialfeaturelanding/blocks.py @@ -1,6 +1,6 @@ from django.template.loader import render_to_string from django.utils.safestring import mark_safe -from wagtail.core import blocks +from wagtail import blocks from wagtail.images.blocks import ImageChooserBlock TEMPLATE_DIRECTORY = "specialfeaturelanding/blocks/" diff --git a/specialfeaturelanding/migrations/0004_speciallandingpage_content.py b/specialfeaturelanding/migrations/0004_speciallandingpage_content.py index 3d150a4c9..a09340bdf 100644 --- a/specialfeaturelanding/migrations/0004_speciallandingpage_content.py +++ b/specialfeaturelanding/migrations/0004_speciallandingpage_content.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.5 on 2021-08-23 23:51 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='speciallandingpage', name='content', - field=wagtail.core.fields.StreamField([('quote', wagtail.core.blocks.StructBlock([('quote', wagtail.core.blocks.RichTextBlock(required=False)), ('source', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('template', wagtail.core.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style Panel Quote')]))], label='Quote Block')), ('stylecta', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('content', wagtail.core.blocks.RichTextBlock(required=True)), ('link', wagtail.core.blocks.PageChooserBlock(required=True)), ('link_text', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('class_name', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('template', wagtail.core.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style CTA')]))], label='Custom Styling CTA'))], blank=True, null=True), + field=wagtail.fields.StreamField([('quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(required=False)), ('source', wagtail.blocks.CharBlock(max_length=255, required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('template', wagtail.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style Panel Quote')]))], label='Quote Block')), ('stylecta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('content', wagtail.blocks.RichTextBlock(required=True)), ('link', wagtail.blocks.PageChooserBlock(required=True)), ('link_text', wagtail.blocks.CharBlock(max_length=255, required=True)), ('class_name', wagtail.blocks.CharBlock(max_length=255, required=True)), ('template', wagtail.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style CTA')]))], label='Custom Styling CTA'))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0005_auto_20210824_1800.py b/specialfeaturelanding/migrations/0005_auto_20210824_1800.py index baff58d4b..e0f6b01be 100644 --- a/specialfeaturelanding/migrations/0005_auto_20210824_1800.py +++ b/specialfeaturelanding/migrations/0005_auto_20210824_1800.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.5 on 2021-08-25 01:00 from django.db import migrations, models -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -21,6 +21,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='content', - field=wagtail.core.fields.StreamField([('quote', wagtail.core.blocks.StructBlock([('quote', wagtail.core.blocks.RichTextBlock(required=False)), ('source', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('template', wagtail.core.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style Panel Quote')])), ('class_name', wagtail.core.blocks.CharBlock(default='panel-quote __1', max_length=255, required=True))], label='Quote Block')), ('stylecta', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('richcontent', wagtail.core.blocks.RichTextBlock(required=False)), ('htmlcontent', wagtail.core.blocks.RawHTMLBlock(required=False)), ('use_richtext', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('link', wagtail.core.blocks.PageChooserBlock(required=True)), ('link_text', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('class_name', wagtail.core.blocks.CharBlock(max_length=255, required=True)), ('template', wagtail.core.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style CTA')]))], label='Custom Styling CTA'))], blank=True, null=True), + field=wagtail.fields.StreamField([('quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(required=False)), ('source', wagtail.blocks.CharBlock(max_length=255, required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('template', wagtail.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style Panel Quote')])), ('class_name', wagtail.blocks.CharBlock(default='panel-quote __1', max_length=255, required=True))], label='Quote Block')), ('stylecta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('richcontent', wagtail.blocks.RichTextBlock(required=False)), ('htmlcontent', wagtail.blocks.RawHTMLBlock(required=False)), ('use_richtext', wagtail.blocks.BooleanBlock(default=False, required=False)), ('link', wagtail.blocks.PageChooserBlock(required=True)), ('link_text', wagtail.blocks.CharBlock(max_length=255, required=True)), ('class_name', wagtail.blocks.CharBlock(max_length=255, required=True)), ('template', wagtail.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style CTA')]))], label='Custom Styling CTA'))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0007_auto_20220802_1754.py b/specialfeaturelanding/migrations/0007_auto_20220802_1754.py index 0bf84f864..9210ab08b 100644 --- a/specialfeaturelanding/migrations/0007_auto_20220802_1754.py +++ b/specialfeaturelanding/migrations/0007_auto_20220802_1754.py @@ -3,8 +3,8 @@ from django.db import migrations, models import django.db.models.deletion import modelcluster.fields -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -19,7 +19,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('credits', wagtail.core.blocks.StreamBlock([('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))])), ('image', wagtail.images.blocks.ImageChooserBlock())], blank=True, null=True), + field=wagtail.fields.StreamField([('credits', wagtail.blocks.StreamBlock([('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))])), ('image', wagtail.images.blocks.ImageChooserBlock())], blank=True, null=True), ), migrations.CreateModel( name='CreditsOrderable', diff --git a/specialfeaturelanding/migrations/0008_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0008_alter_speciallandingpage_editorial_stream.py index b5944ca66..3acea12d4 100644 --- a/specialfeaturelanding/migrations/0008_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0008_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-08-03 01:24 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('credits', wagtail.core.blocks.StreamBlock([('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())]))], blank=True, null=True), + field=wagtail.fields.StreamField([('credits', wagtail.blocks.StreamBlock([('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0009_speciallandingpage_graphical_menu.py b/specialfeaturelanding/migrations/0009_speciallandingpage_graphical_menu.py index bedcc1ff2..b33d0a42b 100644 --- a/specialfeaturelanding/migrations/0009_speciallandingpage_graphical_menu.py +++ b/specialfeaturelanding/migrations/0009_speciallandingpage_graphical_menu.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-08-18 00:39 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields class Migration(migrations.Migration): @@ -15,6 +15,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='speciallandingpage', name='graphical_menu', - field=wagtail.core.fields.StreamField([('menu_item', wagtail.core.blocks.StructBlock([('class_name', wagtail.core.blocks.CharBlock(default='class', max_length=255, required=True)), ('text', wagtail.core.blocks.CharBlock(default='text', max_length=255, required=True))], label='Text'))], blank=True, null=True), + field=wagtail.fields.StreamField([('menu_item', wagtail.blocks.StructBlock([('class_name', wagtail.blocks.CharBlock(default='class', max_length=255, required=True)), ('text', wagtail.blocks.CharBlock(default='text', max_length=255, required=True))], label='Text'))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0011_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0011_alter_speciallandingpage_editorial_stream.py index 5f07584e7..02cc7d7cd 100644 --- a/specialfeaturelanding/migrations/0011_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0011_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-09-01 04:26 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('banner', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.core.blocks.CharBlock()), ('title2', wagtail.core.blocks.CharBlock()), ('credit', wagtail.core.blocks.CharBlock())])), ('credits', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())]))], blank=True, null=True), + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock()), ('title2', wagtail.blocks.CharBlock()), ('credit', wagtail.blocks.CharBlock())])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0012_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0012_alter_speciallandingpage_editorial_stream.py index 6c498b083..99f01f236 100644 --- a/specialfeaturelanding/migrations/0012_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0012_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-09-01 05:07 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('banner', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.core.blocks.CharBlock()), ('title2', wagtail.core.blocks.CharBlock()), ('credit', wagtail.core.blocks.CharBlock())])), ('credits', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())])), ('graphical_menu', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.core.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.core.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.core.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.core.blocks.IntegerBlock(required=False)), ('height', wagtail.core.blocks.IntegerBlock(required=False))]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock()), ('title2', wagtail.blocks.CharBlock()), ('credit', wagtail.blocks.CharBlock())])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())])), ('graphical_menu', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.blocks.IntegerBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(required=False))]))]))]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0013_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0013_alter_speciallandingpage_editorial_stream.py index 331d76099..f80f2391b 100644 --- a/specialfeaturelanding/migrations/0013_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0013_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-09-01 05:59 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('banner', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.core.blocks.CharBlock()), ('title2', wagtail.core.blocks.CharBlock()), ('credit', wagtail.core.blocks.CharBlock())])), ('credits', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())])), ('graphical_menu', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.core.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.core.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.core.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.core.blocks.IntegerBlock(required=False)), ('height', wagtail.core.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.core.blocks.StructBlock([]))], blank=True, null=True), + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock()), ('title2', wagtail.blocks.CharBlock()), ('credit', wagtail.blocks.CharBlock())])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())])), ('graphical_menu', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.blocks.IntegerBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.blocks.StructBlock([]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0016_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0016_alter_speciallandingpage_editorial_stream.py index c435c7984..2b2f2e703 100644 --- a/specialfeaturelanding/migrations/0016_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0016_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-09-17 05:35 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('banner', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.core.blocks.CharBlock()), ('title2', wagtail.core.blocks.CharBlock()), ('credit', wagtail.core.blocks.CharBlock())])), ('credits', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())])), ('graphical_menu', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.core.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.core.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.core.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.core.blocks.IntegerBlock(required=False)), ('height', wagtail.core.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.core.blocks.StructBlock([])), ('flex_stream', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.core.blocks.CharBlock()), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock()), ('title2', wagtail.blocks.CharBlock()), ('credit', wagtail.blocks.CharBlock())])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())])), ('graphical_menu', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.blocks.IntegerBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.blocks.StructBlock([])), ('flex_stream', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.blocks.CharBlock()), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())]))]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0017_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0017_alter_speciallandingpage_editorial_stream.py index 611332c5d..e8b0253b6 100644 --- a/specialfeaturelanding/migrations/0017_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0017_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2022-09-17 09:21 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('banner', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.core.blocks.CharBlock()), ('title2', wagtail.core.blocks.CharBlock()), ('credit', wagtail.core.blocks.CharBlock())])), ('credits', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())])), ('graphical_menu', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.core.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.core.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.core.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.core.blocks.IntegerBlock(required=False)), ('height', wagtail.core.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.core.blocks.StructBlock([])), ('flex_stream', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.core.blocks.CharBlock()), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('rendition', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('rendition-fill-1200x1000.html', 'rendition-fill-1200x1000.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock())]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock()), ('title2', wagtail.blocks.CharBlock()), ('credit', wagtail.blocks.CharBlock())])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())])), ('graphical_menu', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.blocks.IntegerBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.blocks.StructBlock([])), ('flex_stream', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.blocks.CharBlock()), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('rendition', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('rendition-fill-1200x1000.html', 'rendition-fill-1200x1000.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock())]))]))]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/migrations/0019_alter_speciallandingpage_editorial_stream.py b/specialfeaturelanding/migrations/0019_alter_speciallandingpage_editorial_stream.py index e78cabe1b..9d198e568 100644 --- a/specialfeaturelanding/migrations/0019_alter_speciallandingpage_editorial_stream.py +++ b/specialfeaturelanding/migrations/0019_alter_speciallandingpage_editorial_stream.py @@ -1,8 +1,8 @@ # Generated by Django 3.2.11 on 2023-03-03 08:41 from django.db import migrations -import wagtail.core.blocks -import wagtail.core.fields +import wagtail.blocks +import wagtail.fields import wagtail.images.blocks @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='speciallandingpage', name='editorial_stream', - field=wagtail.core.fields.StreamField([('banner', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html'), ('textless_banner_block.html', 'textless_banner_block.html')], required=False)), ('class_selector', wagtail.core.blocks.CharBlock(required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.core.blocks.CharBlock(required=False)), ('title2', wagtail.core.blocks.CharBlock(required=False)), ('credit', wagtail.core.blocks.CharBlock(required=False))])), ('credits', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('editor_credit', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.core.blocks.CharBlock()), ('name', wagtail.core.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.core.blocks.CharBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock())])), ('graphical_menu', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.core.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.core.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.core.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.core.blocks.IntegerBlock(required=False)), ('height', wagtail.core.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.core.blocks.StructBlock([])), ('flex_stream', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.core.blocks.CharBlock()), ('stream', wagtail.core.blocks.StreamBlock([('raw_html', wagtail.core.blocks.RawHTMLBlock()), ('rich_text', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('rendition', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('rendition-fill-1200x1000.html', 'rendition-fill-1200x1000.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock())])), ('card', wagtail.core.blocks.StructBlock([('template', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('mag_2023_card.html', 'mag_2023_card.html')], required=False)), ('class_name', wagtail.core.blocks.CharBlock(required=True)), ('card_title', wagtail.core.blocks.CharBlock(help_text='Add your title', required=True)), ('card_credit', wagtail.core.blocks.CharBlock(help_text='Credit Author', required=True)), ('card_image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('card_page', wagtail.core.blocks.PageChooserBlock(required=True))]))]))]))], blank=True, null=True), + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html'), ('textless_banner_block.html', 'textless_banner_block.html')], required=False)), ('class_selector', wagtail.blocks.CharBlock(required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock(required=False)), ('title2', wagtail.blocks.CharBlock(required=False)), ('credit', wagtail.blocks.CharBlock(required=False))])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())])), ('graphical_menu', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.blocks.IntegerBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.blocks.StructBlock([])), ('flex_stream', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.blocks.CharBlock()), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('rendition', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('rendition-fill-1200x1000.html', 'rendition-fill-1200x1000.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock())])), ('card', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('mag_2023_card.html', 'mag_2023_card.html')], required=False)), ('class_name', wagtail.blocks.CharBlock(required=True)), ('card_title', wagtail.blocks.CharBlock(help_text='Add your title', required=True)), ('card_credit', wagtail.blocks.CharBlock(help_text='Credit Author', required=True)), ('card_image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('card_page', wagtail.blocks.PageChooserBlock(required=True))]))]))]))], blank=True, null=True), ), ] diff --git a/specialfeaturelanding/models.py b/specialfeaturelanding/models.py index a85a6ba35..51f16fd6a 100644 --- a/specialfeaturelanding/models.py +++ b/specialfeaturelanding/models.py @@ -10,7 +10,7 @@ from section.sectionable.models import SectionablePage -from wagtail.admin.edit_handlers import ( +from wagtail.admin.panels import ( FieldPanel, MultiFieldPanel, InlinePanel, @@ -20,9 +20,9 @@ from modelcluster.fields import ParentalKey -from wagtail.core import blocks -from wagtail.core.models import Page, Orderable -from wagtail.core.fields import StreamField +from wagtail import blocks +from wagtail.models import Page, Orderable +from wagtail.fields import StreamField from wagtail.images.blocks import ImageChooserBlock from wagtail.snippets.edit_handlers import SnippetChooserPanel diff --git a/specialfeaturelanding/snippets.py b/specialfeaturelanding/snippets.py index 33c9fa6be..9df61a26e 100644 --- a/specialfeaturelanding/snippets.py +++ b/specialfeaturelanding/snippets.py @@ -3,7 +3,7 @@ from django.db import models from django.db.models.fields.related import ForeignKey -from wagtail.admin.edit_handlers import FieldPanel +from wagtail.admin.panels import FieldPanel from wagtail.snippets.models import register_snippet @register_snippet diff --git a/ubyssey/urls.py b/ubyssey/urls.py index 1673447ac..a8ea5d465 100644 --- a/ubyssey/urls.py +++ b/ubyssey/urls.py @@ -5,7 +5,7 @@ from django.views import defaults as default_views from wagtail.admin import urls as wagtailadmin_urls -from wagtail.core import urls as wagtail_urls +from wagtail import urls as wagtail_urls from wagtail.documents import urls as wagtaildocs_urls from ubyssey.views.main import ads_txt, redirect_blog_to_humour diff --git a/videos/blocks.py b/videos/blocks.py index 17dcd2d64..c7aed1bc3 100644 --- a/videos/blocks.py +++ b/videos/blocks.py @@ -1,4 +1,4 @@ -from wagtail.core import blocks +from wagtail import blocks from wagtail.embeds import blocks as embed_blocks class OneOffVideoBlock(blocks.StructBlock): diff --git a/videos/models.py b/videos/models.py index 40c9dec7b..9f71aa3f1 100644 --- a/videos/models.py +++ b/videos/models.py @@ -15,8 +15,8 @@ from ubyssey.validators import validate_youtube_url from wagtail.snippets.edit_handlers import SnippetChooserPanel -from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel -from wagtail.core.models import Orderable, Page +from wagtail.admin.panels import FieldPanel, InlinePanel, MultiFieldPanel, PageChooserPanel +from wagtail.models import Orderable, Page from wagtail.snippets.models import register_snippet from wagtail.search import index From 60c673711a656c15f0514ea4e708e9adb0a13c8f Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:00:37 +0000 Subject: [PATCH 15/20] Made Request changes from Wagtail --- archive/models.py | 6 ++-- article/migrations/0021_auto_20230815_2248.py | 30 +++++++++++++++++ article/models.py | 26 ++++++++------- authors/migrations/0017_auto_20230815_2248.py | 25 ++++++++++++++ authors/models.py | 14 ++++---- config/settings/development.py | 2 +- config/settings/production.py | 2 +- home/migrations/0022_auto_20230815_2248.py | 33 +++++++++++++++++++ home/models.py | 13 +++++--- .../0004_alter_ubysseyimage_file_hash.py | 18 ++++++++++ images/models.py | 2 +- infinitefeed/models.py | 1 - navigation/models.py | 2 +- .../0013_alter_sectionpage_sidebar_stream.py | 21 ++++++++++++ section/models.py | 15 +++++---- .../migrations/0021_auto_20230815_2248.py | 31 +++++++++++++++++ specialfeaturelanding/models.py | 9 +++-- videos/models.py | 2 +- 18 files changed, 209 insertions(+), 43 deletions(-) create mode 100644 article/migrations/0021_auto_20230815_2248.py create mode 100644 authors/migrations/0017_auto_20230815_2248.py create mode 100644 home/migrations/0022_auto_20230815_2248.py create mode 100644 images/migrations/0004_alter_ubysseyimage_file_hash.py delete mode 100644 infinitefeed/models.py create mode 100644 section/migrations/0013_alter_sectionpage_sidebar_stream.py create mode 100644 specialfeaturelanding/migrations/0021_auto_20230815_2248.py diff --git a/archive/models.py b/archive/models.py index 5467f6d96..89d033c75 100644 --- a/archive/models.py +++ b/archive/models.py @@ -11,7 +11,7 @@ from section.models import SectionPage from wagtail.models import Page, Orderable from wagtail.snippets.edit_handlers import SnippetChooserPanel -from wagtail.admin.panels import MultiFieldPanel, InlinePanel, HelpPanel, PageChooserPanel +from wagtail.admin.panels import MultiFieldPanel, InlinePanel, HelpPanel, PageChooserPanel, FieldPanel from wagtail.contrib.routable_page.models import RoutablePageMixin, route from videos.models import VideosPage, VideoSnippet @@ -53,7 +53,7 @@ class MagazineOrderables(Orderable): panels = [ MultiFieldPanel( [ - SnippetChooserPanel('magazine_filter'), + FieldPanel('magazine_filter'), ], heading="Magazine", ), @@ -74,7 +74,7 @@ class SpoofOrderables(Orderable): panels = [ MultiFieldPanel( [ - SnippetChooserPanel('spoof_filter'), + FieldPanel('spoof_filter'), ], heading="Spoof", ), diff --git a/article/migrations/0021_auto_20230815_2248.py b/article/migrations/0021_auto_20230815_2248.py new file mode 100644 index 000000000..aa793a8bb --- /dev/null +++ b/article/migrations/0021_auto_20230815_2248.py @@ -0,0 +1,30 @@ +# Generated by Django 3.2.11 on 2023-08-16 05:48 + +from django.db import migrations +import images.models +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.embeds.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtail.snippets.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('article', '0020_alter_articlepage_content'), + ] + + operations = [ + migrations.AlterField( + model_name='articlepage', + name='content', + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='DO NOT USE - Legacy block. Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a

...

element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=True)), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='optional, must be mp3 format', required=False))])), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html')), ('header_link', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('header_menu', wagtail.blocks.StructBlock([('list', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a header so that this button will send the user to the section of the page with said header')), ('colour', wagtail.blocks.CharBlock(default='0071c9'))], label='Page Link')))])), ('visual_essay', wagtail.blocks.StructBlock([('view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))])), ('content', wagtail.blocks.StreamBlock([('rich_text', wagtail.blocks.StructBlock([('block', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='doc-full')), ('image', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='image')), ('video', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('raw_html', wagtail.blocks.StructBlock([('block', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='code')), ('quote', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=True)), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='optional, must be mp3 format', required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='openquote')), ('header_link', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='title')), ('gap', wagtail.blocks.StructBlock([('id', wagtail.blocks.CharBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(default=0, min_value=0, required=True))])), ('switch_view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))]))]))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='specialarticlelikepage', + name='right_column_content', + field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block'))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/article/models.py b/article/models.py index 6c8d62427..67b464080 100644 --- a/article/models.py +++ b/article/models.py @@ -96,7 +96,7 @@ class UbysseyMenuMixin(models.Model): HelpPanel('

If the article has a special menu, as when it belongs to a special series of articles, select the relevant menu here

Alternatively, tick the box and select a page to create a menu from

'), ModelChooserPanel('menu'), FieldPanel('create_menu_from_parent'), - PageChooserPanel('parent_page_for_menu_generation'), + FieldPanel('parent_page_for_menu_generation'), ], heading="Special Menus", classname="collapsible", @@ -166,7 +166,7 @@ class ArticleAuthorsOrderable(Orderable): panels = [ MultiFieldPanel( [ - PageChooserPanel("author"), + FieldPanel("author"), FieldPanel( "author_role", widget=Select( @@ -222,7 +222,7 @@ class ConnectedArticleOrderable(Orderable): panels = [ MultiFieldPanel( [ - PageChooserPanel('connected_article'), + FieldPanel('connected_article'), ], heading="Article" ), @@ -249,7 +249,7 @@ class SeriesOrderable(Orderable): panels = [ MultiFieldPanel( [ - PageChooserPanel('article'), + FieldPanel('article'), ], heading="Article" ), @@ -293,8 +293,8 @@ class ArticleFeaturedMediaOrderable(Orderable): panels = [ MultiFieldPanel( [ - ImageChooserPanel("image"), - SnippetChooserPanel("video"), + FieldPanel("image"), + FieldPanel("video"), ], heading="Media Choosers", ), @@ -322,7 +322,7 @@ class ArticleStyleOrderable(Orderable): panels = [ MultiFieldPanel( [ - DocumentChooserPanel('css'), + FieldPanel('css'), ], heading="CSS Document" ), @@ -343,7 +343,7 @@ class ArticleScriptOrderable(Orderable): panels = [ MultiFieldPanel( [ - DocumentChooserPanel('script'), + FieldPanel('script'), ], heading="Script" ), @@ -495,6 +495,7 @@ class ArticlePage(RoutablePageMixin, SectionablePage, UbysseyMenuMixin): ], null=True, blank=True, + use_json_field=True, ) explicit_published_at = models.DateTimeField( null=True, @@ -700,7 +701,7 @@ def get_template(self, request): HelpPanel( content='

Help: Writing Articles

The main contents of the article are organized into \"blocks\". Click the + to add a block. Most article text should be written in Rich Text Blocks, but many other features are available!

Blocks simply represent units of the article you may wish to re-arrange. You do not have to put every individual paragraph in its own block (doing so is probably time consuming!). Many articles that have been imported into our database DO divide every paragraph into its own block, but this is for computer convenience during the import.

' ), - StreamFieldPanel("content"), + FieldPanel("content"), ], heading="Article Content", classname="collapsible", @@ -723,7 +724,7 @@ def get_template(self, request): MultiFieldPanel( [ # FieldPanel("section"), - SnippetChooserPanel("category"), + FieldPanel("category"), FieldPanel("tags"), ], heading="Categories and Tags", @@ -831,7 +832,7 @@ def get_template(self, request): HelpPanel(content='

Warning

If a timeline is included in your article, additional processing will be required when the article is saved.

It is recommended you add a Timeline snippet LAST, after your article is otherwise written.

Developers should note: the Timeline/Article sync is accomplished with Django signals, to prevent tight coupling of the two classes. Do not allow use of signals to turn into noodle logic.

'), FieldPanel('show_timeline'), FieldPanel('timeline_date'), - SnippetChooserPanel('timeline'), + FieldPanel('timeline'), ], heading = "Timeline", classname="collapsible collapsed", @@ -1125,6 +1126,7 @@ class SpecialArticleLikePage(ArticlePage): ], null=True, blank=True, + use_json_field=True, ) content_panels = ArticlePage.content_panels + [ @@ -1133,7 +1135,7 @@ class SpecialArticleLikePage(ArticlePage): HelpPanel( content='' ), - StreamFieldPanel("right_column_content") + FieldPanel("right_column_content") ], heading="Article Right Column Content", classname="collapsible", diff --git a/authors/migrations/0017_auto_20230815_2248.py b/authors/migrations/0017_auto_20230815_2248.py new file mode 100644 index 000000000..c89cf3074 --- /dev/null +++ b/authors/migrations/0017_auto_20230815_2248.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.11 on 2023-08-16 05:48 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('authors', '0016_alter_authorpage_main_media_type'), + ] + + operations = [ + migrations.AlterField( + model_name='authorpage', + name='linkIcons', + field=wagtail.fields.StreamField([('raw_html', wagtail.blocks.RawHTMLBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='authorpage', + name='links', + field=wagtail.fields.StreamField([('url', wagtail.blocks.URLBlock(label='Url'))], blank=True, use_json_field=True), + ), + ] diff --git a/authors/models.py b/authors/models.py index b6ed5cbcc..c0389cb1a 100644 --- a/authors/models.py +++ b/authors/models.py @@ -57,7 +57,7 @@ class PinnedArticlesOrderable(Orderable): panels = [ MultiFieldPanel( [ - PageChooserPanel('article'), + FieldPanel('article'), ], heading="Article" ), @@ -136,8 +136,8 @@ class AuthorPage(RoutablePageMixin, Page): blank=False, null=False,) - linkIcons = StreamField([('raw_html', blocks.RawHTMLBlock()),], blank=True) - links = StreamField([('url', blocks.URLBlock(label="Url")),], blank=True) + linkIcons = StreamField([('raw_html', blocks.RawHTMLBlock()),], blank=True, use_json_field=True) + links = StreamField([('url', blocks.URLBlock(label="Url")),], blank=True, use_json_field=True) # For editting in wagtail: content_panels = [ @@ -145,7 +145,7 @@ class AuthorPage(RoutablePageMixin, Page): FieldPanel("full_name"), MultiFieldPanel( [ - ImageChooserPanel("image"), + FieldPanel("image"), FieldPanel("display_image"), ], heading="Image" @@ -153,10 +153,10 @@ class AuthorPage(RoutablePageMixin, Page): MultiFieldPanel( [ FieldPanel("ubyssey_role"), - StreamFieldPanel("bio_description"), - StreamFieldPanel("short_bio_description"), + FieldPanel("bio_description"), + FieldPanel("short_bio_description"), FieldPanel("main_media_type"), - StreamFieldPanel("links"), + FieldPanel("links"), InlinePanel("pinned_articles", label="Pinned articles") ], heading="Optional Stuff", diff --git a/config/settings/development.py b/config/settings/development.py index 9d3d65505..9e5629f34 100644 --- a/config/settings/development.py +++ b/config/settings/development.py @@ -5,7 +5,7 @@ # Therefore the below "import *" is correct from .base import * -BASE_URL = 'http://localhost:8000/' +WAGTAILADMIN_BASE_URL = 'http://localhost:8000/' ALLOWED_HOSTS = ['localhost', '*'] diff --git a/config/settings/production.py b/config/settings/production.py index b85bfc4ce..9a97409c4 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -8,7 +8,7 @@ env = environ.Env() #Scope issues without this line? -BASE_URL = 'https://www.ubyssey.ca/' +WAGTAILADMIN_BASE_URL = 'https://www.ubyssey.ca/' ALLOWED_HOSTS = ['localhost', '*'] diff --git a/home/migrations/0022_auto_20230815_2248.py b/home/migrations/0022_auto_20230815_2248.py new file mode 100644 index 000000000..ff5f32298 --- /dev/null +++ b/home/migrations/0022_auto_20230815_2248.py @@ -0,0 +1,33 @@ +# Generated by Django 3.2.11 on 2023-08-16 05:48 + +from django.db import migrations +import section.models +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtail.snippets.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0021_alter_homepage_sidebar_stream'), + ] + + operations = [ + migrations.AlterField( + model_name='homepage', + name='links', + field=wagtail.fields.StreamField([('link', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('url', wagtail.blocks.URLBlock(required=False)), ('description', wagtail.blocks.TextBlock(required=False))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='sections_stream', + field=wagtail.fields.StreamField([('home_page_section_block', wagtail.blocks.StructBlock([('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage'])), ('layout', wagtail.blocks.ChoiceBlock(choices=[('bulleted', '"Bulleted Section" Style'), ('featured', '"Featured Section" Style')]))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='sidebar_stream', + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_category_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('category', wagtail.snippets.blocks.SnippetChooserBlock(section.models.CategorySnippet))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.blocks.StreamBlock([('image_link', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/home/models.py b/home/models.py index e0133c9d3..5197334ac 100644 --- a/home/models.py +++ b/home/models.py @@ -29,7 +29,7 @@ class TopArticlesOrderable(Orderable): panels = [ MultiFieldPanel( [ - PageChooserPanel('article'), + FieldPanel('article'), ], heading="Article" ), @@ -74,6 +74,7 @@ class HomePage(Page): ], null=True, blank=True, + use_json_field=True, ) sections_stream = StreamField( @@ -82,6 +83,7 @@ class HomePage(Page): ], null=True, blank=True, + use_json_field=True, ) sidebar_stream = StreamField( @@ -94,6 +96,7 @@ class HomePage(Page): ], null=True, blank=True, + use_json_field=True, ) # home_leaderboard_ad_slot = models.ForeignKey( @@ -133,16 +136,16 @@ class HomePage(Page): ], heading="Tagline" ), - PageChooserPanel("cover_story"), + FieldPanel("cover_story"), MultiFieldPanel( [ InlinePanel("top_articles"), ], heading="Top articles" ), - StreamFieldPanel("links", heading="Links"), - StreamFieldPanel("sidebar_stream", heading="Sidebar"), - StreamFieldPanel("sections_stream", heading="Sections"), + FieldPanel("links", heading="Links"), + FieldPanel("sidebar_stream", heading="Sidebar"), + FieldPanel("sections_stream", heading="Sections"), # ModelChooserPanel('home_leaderboard_ad_slot'), # ModelChooserPanel('home_mobile_leaderboard_ad_slot'), # ModelChooserPanel('home_sidebar_ad_slot1'), diff --git a/images/migrations/0004_alter_ubysseyimage_file_hash.py b/images/migrations/0004_alter_ubysseyimage_file_hash.py new file mode 100644 index 000000000..d50f5adf0 --- /dev/null +++ b/images/migrations/0004_alter_ubysseyimage_file_hash.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.11 on 2023-08-16 05:19 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('images', '0003_ubysseyimage_legacy_pk'), + ] + + operations = [ + migrations.AlterField( + model_name='ubysseyimage', + name='file_hash', + field=models.CharField(blank=True, db_index=True, editable=False, max_length=40), + ), + ] diff --git a/images/models.py b/images/models.py index f0b91e82e..4e2b2a7db 100644 --- a/images/models.py +++ b/images/models.py @@ -215,7 +215,7 @@ class GalleryOrderable(Orderable): panels = [ MultiFieldPanel( [ - ImageChooserPanel("image"), + FieldPanel("image"), ], heading="Image Chooser", ), diff --git a/infinitefeed/models.py b/infinitefeed/models.py deleted file mode 100644 index 8b1378917..000000000 --- a/infinitefeed/models.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/navigation/models.py b/navigation/models.py index e3660cd90..547c964a8 100644 --- a/navigation/models.py +++ b/navigation/models.py @@ -38,7 +38,7 @@ class NavigationMenuOrderable(Orderable): panels = [ MultiFieldPanel([ - PageChooserPanel("internal_link"), + FieldPanel("internal_link"), FieldPanel("external_link"), FieldPanel("link_text"), ], heading="Link", diff --git a/section/migrations/0013_alter_sectionpage_sidebar_stream.py b/section/migrations/0013_alter_sectionpage_sidebar_stream.py new file mode 100644 index 000000000..f3c6af3dc --- /dev/null +++ b/section/migrations/0013_alter_sectionpage_sidebar_stream.py @@ -0,0 +1,21 @@ +# Generated by Django 3.2.11 on 2023-08-16 05:48 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('section', '0012_sectionpage_sidebar_stream'), + ] + + operations = [ + migrations.AlterField( + model_name='sectionpage', + name='sidebar_stream', + field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.blocks.StreamBlock([('image_link', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False))]))]))]))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/section/models.py b/section/models.py index 1656a0cf1..29d319da1 100644 --- a/section/models.py +++ b/section/models.py @@ -80,14 +80,14 @@ class CategorySnippet(index.Indexed, ClusterableModel): [ FieldPanel("title"), FieldPanel("slug"), - PageChooserPanel("section_page"), + FieldPanel("section_page"), FieldPanel("description"), ], heading="Essentials" ), MultiFieldPanel( [ - ImageChooserPanel("banner"), + FieldPanel("banner"), ], heading="Banner", ), @@ -120,7 +120,7 @@ class CategoryAuthor(wagtail_core_models.Orderable): related_name="category_authors", ) panels = [ - PageChooserPanel("author"), + FieldPanel("author"), ] class CategoryMenuItem(wagtail_core_models.Orderable): @@ -137,7 +137,7 @@ class CategoryMenuItem(wagtail_core_models.Orderable): related_name="category_menu", ) panels = [ - SnippetChooserPanel("category"), + FieldPanel("category"), ] class SectionPage(RoutablePageMixin, SectionablePage): @@ -186,12 +186,13 @@ class SectionPage(RoutablePageMixin, SectionablePage): ], null=True, blank=True, + use_json_field=True, ) content_panels = wagtail_core_models.Page.content_panels + [ MultiFieldPanel( [ - ImageChooserPanel("banner"), + FieldPanel("banner"), ], heading="Banner", ), @@ -203,7 +204,7 @@ class SectionPage(RoutablePageMixin, SectionablePage): ), MultiFieldPanel( [ - DocumentChooserPanel('label_svg'), + FieldPanel('label_svg'), ], heading="Label svg" ), @@ -215,7 +216,7 @@ class SectionPage(RoutablePageMixin, SectionablePage): ), MultiFieldPanel( [ - StreamFieldPanel("sidebar_stream"), + FieldPanel("sidebar_stream"), ], heading="Sidebar" ) diff --git a/specialfeaturelanding/migrations/0021_auto_20230815_2248.py b/specialfeaturelanding/migrations/0021_auto_20230815_2248.py new file mode 100644 index 000000000..0873fad02 --- /dev/null +++ b/specialfeaturelanding/migrations/0021_auto_20230815_2248.py @@ -0,0 +1,31 @@ +# Generated by Django 3.2.11 on 2023-08-16 05:48 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('specialfeaturelanding', '0020_speciallandingpage_category'), + ] + + operations = [ + migrations.AlterField( + model_name='speciallandingpage', + name='content', + field=wagtail.fields.StreamField([('quote', wagtail.blocks.StructBlock([('quote', wagtail.blocks.RichTextBlock(required=False)), ('source', wagtail.blocks.CharBlock(max_length=255, required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('template', wagtail.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style Panel Quote')])), ('class_name', wagtail.blocks.CharBlock(default='panel-quote __1', max_length=255, required=True))], label='Quote Block')), ('stylecta', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('richcontent', wagtail.blocks.RichTextBlock(required=False)), ('htmlcontent', wagtail.blocks.RawHTMLBlock(required=False)), ('use_richtext', wagtail.blocks.BooleanBlock(default=False, required=False)), ('link', wagtail.blocks.PageChooserBlock(required=True)), ('link_text', wagtail.blocks.CharBlock(max_length=255, required=True)), ('class_name', wagtail.blocks.CharBlock(max_length=255, required=True)), ('template', wagtail.blocks.ChoiceBlock(choices=[('guide-2020', '"Guide 2020"-Style CTA')]))], label='Custom Styling CTA'))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='speciallandingpage', + name='editorial_stream', + field=wagtail.fields.StreamField([('banner', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-banner.html', 'guide-2021-banner.html'), ('textless_banner_block.html', 'textless_banner_block.html')], required=False)), ('class_selector', wagtail.blocks.CharBlock(required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('title1', wagtail.blocks.CharBlock(required=False)), ('title2', wagtail.blocks.CharBlock(required=False)), ('credit', wagtail.blocks.CharBlock(required=False))])), ('credits', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editorial-stream.html', 'guide-2021-editorial-stream.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('editor_credit', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editor-credit.html', 'guide-2021-editor-credit.html')], required=False)), ('role', wagtail.blocks.CharBlock()), ('name', wagtail.blocks.CharBlock())]))]))])), ('image', wagtail.images.blocks.ImageChooserBlock()), ('note_with_header', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-editors-note.html', 'guide-2021-editors-note.html'), ('guide-2021-land-acknowledgement.html', 'guide-2021-land-acknowledgement.html')], required=False)), ('title', wagtail.blocks.CharBlock()), ('rich_text', wagtail.blocks.RichTextBlock())])), ('graphical_menu', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu.html', 'guide-2021-graphical-menu.html')], required=False)), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('graphical_menu_item', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('guide-2021-graphical-menu-item.html', 'guide-2021-graphical-menu-item.html')], required=False)), ('div_class_name', wagtail.blocks.CharBlock(default='box', max_length=255, required=True)), ('img_class_name', wagtail.blocks.CharBlock(default='photo_cover', max_length=255, required=True)), ('link', wagtail.blocks.URLBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('width', wagtail.blocks.IntegerBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(required=False))]))]))])), ('child_articles', wagtail.blocks.StructBlock([])), ('flex_stream', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('2022-div-stream-block.html', '2022-div-stream-block.html')], required=False)), ('class_selector', wagtail.blocks.CharBlock()), ('stream', wagtail.blocks.StreamBlock([('raw_html', wagtail.blocks.RawHTMLBlock()), ('rich_text', wagtail.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('rendition', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('rendition-fill-1200x1000.html', 'rendition-fill-1200x1000.html')], required=False)), ('image', wagtail.images.blocks.ImageChooserBlock())])), ('card', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('', 'Wagtail default'), ('mag_2023_card.html', 'mag_2023_card.html')], required=False)), ('class_name', wagtail.blocks.CharBlock(required=True)), ('card_title', wagtail.blocks.CharBlock(help_text='Add your title', required=True)), ('card_credit', wagtail.blocks.CharBlock(help_text='Credit Author', required=True)), ('card_image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('card_page', wagtail.blocks.PageChooserBlock(required=True))]))]))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='speciallandingpage', + name='graphical_menu', + field=wagtail.fields.StreamField([('menu_item', wagtail.blocks.StructBlock([('class_name', wagtail.blocks.CharBlock(default='class', max_length=255, required=True)), ('text', wagtail.blocks.CharBlock(default='text', max_length=255, required=True))], label='Text'))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/specialfeaturelanding/models.py b/specialfeaturelanding/models.py index 51f16fd6a..d87045b06 100644 --- a/specialfeaturelanding/models.py +++ b/specialfeaturelanding/models.py @@ -111,6 +111,7 @@ def get_template(self, request): ], null=True, blank=True, + use_json_field=True, ) content = StreamField( @@ -124,6 +125,7 @@ def get_template(self, request): ], null=True, blank=True, + use_json_field=True, ) graphical_menu = StreamField( @@ -137,6 +139,7 @@ def get_template(self, request): ], null=True, blank=True, + use_json_field=True, ) content_panels = Page.content_panels + UbysseyMenuMixin.menu_content_panels + [ @@ -152,14 +155,14 @@ def get_template(self, request): # HelpPanel( # content='

TODO

Write something here

' # ), - # StreamFieldPanel("content"), + # FieldPanel("content"), # ], # heading="Article Content", # classname="collapsible", # ), MultiFieldPanel( [ - StreamFieldPanel("editorial_stream"), + FieldPanel("editorial_stream"), ], heading="Editorial Content" ), @@ -176,7 +179,7 @@ def get_template(self, request): ), MultiFieldPanel( [ - SnippetChooserPanel("category"), + FieldPanel("category"), ], heading="Categories", classname="collapsible", diff --git a/videos/models.py b/videos/models.py index 9f71aa3f1..b884c66ed 100644 --- a/videos/models.py +++ b/videos/models.py @@ -43,7 +43,7 @@ class VideoAuthorsOrderable(Orderable): panels = [ MultiFieldPanel( [ - PageChooserPanel("author"), + FieldPanel("author"), ], heading="Author", ), From 347cbf7be5bac1b75aeef6d1b05cc6ddda6a6b34 Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 08:01:57 +0000 Subject: [PATCH 16/20] Adjused the dev requirements versions --- requirements.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/requirements.txt b/requirements.txt index a17ae7774..039bcd40f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ Django==3.2.11 wagtail==3.0.0 git+https://github.com/ubyssey/django-google-storage.git@v0.5.4#egg=django-google-storage-updated -django-storages[google]==1.10 +django-storages[google]==1.13.2 django-canonical-domain==0.3.0 pymemcache==3.5.0 mysqlclient==2.0.1 django-phonenumber-field==2.0.0 phonenumbers==8.12.9 beautifulsoup4==4.8.2 -feedparser==6.0.1 -pyyaml==5.4 +feedparser==6.0.10 +pyyaml==6.0.1 ua-parser==0.10.0 user-agents==2.2.0 django-user_agents==0.4.0 @@ -18,18 +18,18 @@ Pillow==9.3.0 google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==2.11.0 -django-environ==0.4.5 -requests==2.24.0 +django-environ==0.10.0 +requests==2.31.0 whitenoise==5.1.0 brotli==1.0.9 -django-extensions==3.1.3 +django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates -wagtail-modelchooser==2.13.1 -wagtailmenus==3.0.2 +wagtail-modelchooser==3.0.0 +wagtailmenus==3.1.8 wagtail-cache==1.0.2 google-crc32c==1.3.0 wagtail-color-panel==1.4.0 -django-debug-toolbar==3.2.1 -pylint==2.8.3 -pylint-django==2.4.4 +django-debug-toolbar==4.2.0 +pylint==2.17.5 +pylint-django==2.5.3 ipython \ No newline at end of file From c1c0c2613c17842f48ef3a0593448c1bb3398fc4 Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 08:03:45 +0000 Subject: [PATCH 17/20] Removal of the phonenumber packages --- requirements-prd.txt | 2 -- requirements.txt | 2 -- 2 files changed, 4 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index 4594df94d..480843245 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -5,8 +5,6 @@ django-storages[google]==1.10 django-canonical-domain==0.3.0 pymemcache==3.5.0 mysqlclient==2.0.1 -django-phonenumber-field==2.0.0 -phonenumbers==8.12.9 beautifulsoup4==4.8.2 feedparser==6.0.1 pyyaml==5.4 diff --git a/requirements.txt b/requirements.txt index 039bcd40f..9665a1d8d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,8 +5,6 @@ django-storages[google]==1.13.2 django-canonical-domain==0.3.0 pymemcache==3.5.0 mysqlclient==2.0.1 -django-phonenumber-field==2.0.0 -phonenumbers==8.12.9 beautifulsoup4==4.8.2 feedparser==6.0.10 pyyaml==6.0.1 From 639107aaebb7279fe854ee7f1d930ac24de9cf70 Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 08:06:09 +0000 Subject: [PATCH 18/20] Updated the requirements-prd --- requirements-prd.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index 480843245..0e571ce6d 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -6,8 +6,8 @@ django-canonical-domain==0.3.0 pymemcache==3.5.0 mysqlclient==2.0.1 beautifulsoup4==4.8.2 -feedparser==6.0.1 -pyyaml==5.4 +feedparser==6.0.10 +pyyaml==6.0.1 ua-parser==0.10.0 user-agents==2.2.0 django-user_agents==0.4.0 @@ -16,14 +16,14 @@ Pillow==9.3.0 google-cloud-datastore==1.15.0 google-cloud-storage==1.31.0 google-cloud-secret-manager==2.11.0 -django-environ==0.4.5 -requests==2.24.0 +django-environ==0.10.0 +requests==2.31.0 whitenoise==5.1.0 brotli==1.0.9 -django-extensions==3.1.3 +django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates -wagtail-modelchooser==2.13.1 -wagtailmenus==3.0.2 +wagtail-modelchooser==3.0.0 +wagtailmenus==3.1.8 wagtail-cache==1.0.2 google-crc32c==1.3.0 wagtail-color-panel==1.4.0 From 9a9364e644b5b268d1d4c770949df692796c0e6b Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:21:18 +0000 Subject: [PATCH 19/20] Updated the wagtail cache to 2.1.1 for wagtail 3 --- config/settings/production.py | 2 ++ requirements-prd.txt | 2 +- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/settings/production.py b/config/settings/production.py index 9a97409c4..62d36f76d 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -29,6 +29,8 @@ # 'LOCATION': '10.18.240.4:11211', } } +# WAGTAIL_CACHE_IGNORE_COOKIES = False +# WAGTAIL_CACHE_IGNORE_QS = None MIDDLEWARE += [ 'canonical_domain.middleware.CanonicalDomainMiddleware', diff --git a/requirements-prd.txt b/requirements-prd.txt index bbfa8a029..54148b176 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -24,6 +24,6 @@ django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates wagtail-modelchooser==3.0.0 wagtailmenus==3.1.8 -wagtail-cache==1.0.2 +wagtail-cache==2.1.1 google-crc32c==1.3.0 wagtail-color-panel==1.4.0 diff --git a/requirements.txt b/requirements.txt index d9eeeac81..e49fee702 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ django-extensions==3.2.3 git+https://github.com/jazzband/django-dbtemplates.git@233a401#egg=django-dbtemplates wagtail-modelchooser==3.0.0 wagtailmenus==3.1.8 -wagtail-cache==1.0.2 +wagtail-cache==2.1.1 google-crc32c==1.3.0 wagtail-color-panel==1.4.0 django-debug-toolbar==4.2.0 From 666887f7d740b45e6a881bffa0f20e2b89f4c72d Mon Sep 17 00:00:00 2001 From: FireBoyAJ24 <63443017+FireBoyAJ24@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:24:16 +0000 Subject: [PATCH 20/20] Changed the version of bs4 to be compatible to wagtail --- requirements-prd.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-prd.txt b/requirements-prd.txt index d9230ce39..195aaa33c 100644 --- a/requirements-prd.txt +++ b/requirements-prd.txt @@ -5,7 +5,7 @@ django-storages[google]==1.10 django-canonical-domain==0.3.0 pymemcache==4.0.0 mysqlclient==2.0.1 -beautifulsoup4==4.12.2 +beautifulsoup4==4.9.0 feedparser==6.0.10 pyyaml==6.0.1 ua-parser==0.10.0 diff --git a/requirements.txt b/requirements.txt index c7ee8f07a..3820dd9a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ django-storages[google]==1.13.2 django-canonical-domain==0.3.0 pymemcache==4.0.0 mysqlclient==2.0.1 -beautifulsoup4==4.12.2 +beautifulsoup4==4.9.0 feedparser==6.0.10 pyyaml==6.0.1 ua-parser==0.10.0