-
Notifications
You must be signed in to change notification settings - Fork 87
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 5.2 compatability #733
Conversation
@aekong thank you for this. The change needs to be conditional (ie only use |
ah ok, like this? try:
# for wagtail 5.2
from wagtail.admin.ui.side_panels import PageStatusSidePanel, PreviewSidePanel
except ImportError:
from wagtail.admin.ui.side_panels import PagePreviewSidePanel as PreviewSidePanel, PageSidePanels as PageStatusSidePanel |
@aekong that works. The preferred pattern that Wagtail uses is: from wagtail import VERSION as WAGTAIL_VERSION
if WAGTAIL_VERSION >= (5, 2):
from wagtail.admin.ui.side_panels import PageStatusSidePanel, PreviewSidePanel
else:
from wagtail.admin.ui.side_panels import PagePreviewSidePanel as PreviewSidePanel, PageSidePanels as PageStatusSidePanel This has the added benefit of being easily searchable when we drop support for Wagtail < 5.2 |
ah got it, thanks! 1872b2b |
@aekong thanks for making a start on this. I will take over as there a more fundamental changes we need to account for |
sounds good, thank you! if you have time, what are some of those fundamental changes? no worries if you don't have bandwidth to respond to this - just for my own curiosity. i am pretty new to wagtail in general |
version 1.7rc1 is now out. You can use |
awesome, thanks! |
The most recent release of wagtail 5.2 replaces PagePreviewSidePanel with PreviewSidePanel.
wagtail_localize/side_panels.py
needs a small update to comply