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

Refactor Django upgrade commands #271

Open
nutjob4life opened this issue Jun 5, 2023 · 0 comments
Open

Refactor Django upgrade commands #271

nutjob4life opened this issue Jun 5, 2023 · 0 comments
Assignees
Labels
🧙‍♀️enhancement New feature or request

Comments

@nutjob4life
Copy link
Member

Now that we've transition from Plone to Wagtail (version 6.0), and done two post-conversion upgrades (6.1 and 6.2), I'm noticing a pattern in the Django upgrade commands that produces a lot of repetition and boiler-plate code.

This primarily has to do with each upgrade command having to

  • Save the current state of Wagtail automatic redirection creation
  • Disable Wagtail automatic redirection creation
  • Save the current state of Wagtail indexing
  • Disable Wagtail indexing
  • Then, finally, execute the command
  • And, whether it succeeds or not:
    • Restoring the state of Wagtail indexing
    • Restoring the state of Wagtail automatic redirection creation

To reduce the lines of code and decrease the chance of error, these steps should be refactored into a common superclass for P5-specific Django upgrade commands.

@nutjob4life nutjob4life added the 🧙‍♀️enhancement New feature or request label Jun 5, 2023
@nutjob4life nutjob4life added this to the 6.3.0 milestone Jun 5, 2023
@nutjob4life nutjob4life self-assigned this Jun 5, 2023
@nutjob4life nutjob4life modified the milestones: 6.3.0, 6.4.0 Jun 16, 2023
@nutjob4life nutjob4life removed this from the 6.4.0 milestone Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧙‍♀️enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant