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

Wagtail 4.2 support #79

Merged
merged 9 commits into from Mar 18, 2023

Conversation

katdom13
Copy link
Contributor

@katdom13 katdom13 commented Feb 2, 2023

Supress warnings from earlier wagtail versions

@katdom13 katdom13 changed the title Wagtail 4.2 support Draft: Pre-release Wagtail 4.2 support Feb 2, 2023
@Stormheg
Copy link
Member

Stormheg commented Feb 6, 2023

Hi @katdom13, thanks for the contribution! ❤️

I'll check this out in detail when I have time. Please be patient.

Copy link

@nickmoreton nickmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katdom13 Thanks the code changes look good to me. Just a couple of suggestions.

tox.ini Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@katdom13 katdom13 changed the title Draft: Pre-release Wagtail 4.2 support Wagtail 4.2 support Feb 10, 2023
Copy link

@nickmoreton nickmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @katdom13 - sorry that it took me so long to properly review your pull request.

I'm really happy with your changes, but I do have one minor suggestion (see comment). Are you happy to make that change?

Thanks again for your help maintaining wagtail-bakery ❤️

from wagtail.core.models import Page
from wagtail import blocks
from wagtail.admin.panels import FieldPanel
from wagtail.admin.panels import FieldPanel as StreamFieldPanel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: we can drop the StreamFieldPanel import and use FieldPanel in the example. I feel like this aliased import may confuse users reading this example.

from wagtail.core.models import Page
from wagtail import blocks
from wagtail.admin.panels import FieldPanel
from wagtail.admin.panels import FieldPanel as StreamFieldPanel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment.

from wagtail.core.fields import StreamField
from wagtail.core.models import Page
from wagtail import blocks
from wagtail.admin.panels import FieldPanel, StreamFieldPanel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment.

Comment on lines -25 to -33
if WAGTAIL_VERSION >= (2, 9):
wagtail_middleware = [
'wagtail.contrib.redirects.middleware.RedirectMiddleware',
]
else:
wagtail_middleware = [
'wagtail.core.middleware.SiteMiddleware',
'wagtail.contrib.redirects.middleware.RedirectMiddleware',
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that is old compatibility code. Thanks for cleaning that up! 🚀

@loicteixeira loicteixeira requested review from Stormheg and nickmoreton and removed request for nickmoreton March 13, 2023 07:28
@loicteixeira loicteixeira merged commit 284510d into wagtail-nest:main Mar 18, 2023
7 checks passed
@loicteixeira
Copy link
Collaborator

Thank you for your work @katdom13 and the review @Stormheg.
I'll attempt to finish #80 and create a new release.

@loicteixeira loicteixeira mentioned this pull request Mar 18, 2023
loicteixeira added a commit to ckljohn/wagtail-bakery that referenced this pull request Mar 18, 2023
* main:
  Wagtail 4.2 support (wagtail-nest#79)
  Update URLs to wagtail-nest (wagtail-nest#82)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants