Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8019] wagtail incremental upgrade from 4.1.6 to 5.2 #2554

Merged
merged 6 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions apps/cms/images/migrations/0003_auto_20240208_1216.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 3.2.19 on 2024-02-08 11:16

from django.db import migrations
import wagtail.images.models


class Migration(migrations.Migration):
dependencies = [
("a4_candy_cms_images", "0002_alter_customimage_file_hash"),
]

operations = [
migrations.AlterField(
model_name="customimage",
name="file",
field=wagtail.images.models.WagtailImageField(
height_field="height",
upload_to=wagtail.images.models.get_upload_to,
verbose_name="file",
width_field="width",
),
),
migrations.AlterField(
model_name="customrendition",
name="file",
field=wagtail.images.models.WagtailImageField(
height_field="height",
upload_to=wagtail.images.models.get_rendition_upload_to,
width_field="width",
),
),
]
8 changes: 4 additions & 4 deletions apps/cms/settings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
from wagtail import fields
from wagtail.admin.panels import FieldPanel
from wagtail.admin.panels import PageChooserPanel
from wagtail.contrib.settings.models import BaseSetting
from wagtail.contrib.settings.models import BaseSiteSetting
from wagtail.contrib.settings.models import register_setting

from apps.contrib.translations import TranslatedField


@register_setting(icon="warning")
class ImportantPages(BaseSetting):
class ImportantPages(BaseSiteSetting):
terms_of_use = models.ForeignKey(
"wagtailcore.Page",
related_name="important_page_terms_of_use",
Expand Down Expand Up @@ -115,7 +115,7 @@ class ImportantPages(BaseSetting):

# these are settings for platform organisation
@register_setting(icon="pick")
class OrganisationSettings(BaseSetting):
class OrganisationSettings(BaseSiteSetting):
platform_name = models.CharField(
max_length=20,
default="adhocracy+",
Expand Down Expand Up @@ -143,7 +143,7 @@ class Meta:


@register_setting
class SocialMedia(BaseSetting):
class SocialMedia(BaseSiteSetting):
facebook = models.URLField(blank=True)
twitter = models.URLField(blank=True)
github = models.URLField(blank=True)
Expand Down
2 changes: 1 addition & 1 deletion apps/notifications/emails.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib import auth
from django.urls import reverse
from wagtail.core.models import Site
from wagtail.models import Site

from apps.cms.settings.models import ImportantPages
from apps.organisations.models import Organisation
Expand Down
6 changes: 6 additions & 0 deletions changelog/7637_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Upgraded

- wagtail from 4.1.9 to 4.2
- replace BaseSettings with BaseSiteSettings
- import Site from wagtail.models instead of wagtail.core.models
- migration for WagtailImageField which extends Django’s ImageField to use Willow for image file handling
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ django-cloudflare-push==0.2.2
django_csp==3.7
django-parler==2.3
sentry-sdk==1.25.1
wagtail==4.1.6
wagtail==4.2
whitenoise==6.4.0
xmltodict==0.13.0
zeep==4.2.1
Expand Down
Loading