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

Fix Revision model change in Wagtail 4.0 #630

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

zerolab
Copy link
Collaborator

@zerolab zerolab commented Oct 7, 2022

this should cover:

  • adding localize to a Wagtail 4 project
  • upgrading a project using localize to Wagtail 4

Fixes #629

@zerolab
Copy link
Collaborator Author

zerolab commented Oct 7, 2022

@ArnarTumi any chance you could test this on your projects pip install git+https://github.com/wagtail/wagtail-localize.git@fix/pagerevision-revision-switcharoo-dance. Note that installing it this way won't have the compiled assets so the edit translation view will error. Should not matter as you're testing adding localize to an existing project. If you have any on pre 4.0, would be nice to try it on them too

cc @iscilyas in the context of #615 too

@codecov-commenter
Copy link

Codecov Report

Base: 91.77% // Head: 91.77% // No change to project coverage 👍

Coverage data is based on head (9b5802a) compared to base (51df05e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #630   +/-   ##
=======================================
  Coverage   91.77%   91.77%           
=======================================
  Files          46       46           
  Lines        3950     3950           
  Branches      596      596           
=======================================
  Hits         3625     3625           
  Misses        192      192           
  Partials      133      133           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zerolab zerolab marked this pull request as draft October 7, 2022 15:27
@zerolab zerolab force-pushed the fix/pagerevision-revision-switcharoo-dance branch from 9b5802a to 78d8eda Compare October 7, 2022 15:30
this should cover:
- adding localize to a Wagtail 4 project
- upgrading a project using localize to Wagtail 4
@zerolab zerolab force-pushed the fix/pagerevision-revision-switcharoo-dance branch from 78d8eda to ed0025f Compare October 7, 2022 15:35
@ArnarTumi
Copy link

Hey @zerolab I was able to install this both on wagtail 4.0.2 and wagtail 2.15.5 so this seems to be working :)

@zerolab zerolab marked this pull request as ready for review October 10, 2022 10:40
@zerolab zerolab requested a review from gasman October 12, 2022 08:17
@zerolab
Copy link
Collaborator Author

zerolab commented Oct 14, 2022

@gasman will merge this as is tomorrow mid-morning, unless I hear otherwise

Copy link
Contributor

@gasman gasman left a comment

Choose a reason for hiding this comment

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

LGTM! This looks like a very neat way of dealing with the unpredictability of the model name. I look forward to stealing it for wagtail-review :-)

@zerolab
Copy link
Collaborator Author

zerolab commented Oct 14, 2022

Thank you! it took quite some trial and error. Lots of TILs in the process. I am both in awe and somewhat mystified by the power of Django migrations

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.

Migration fail installing wagtail-localize fresh on a wagtail 4.1 project
4 participants