Skip to content

Commit

Permalink
Add a replacement rule into wagtail updatemodulepaths for the wagta…
Browse files Browse the repository at this point in the history
…il.core rename

This adds a new rule into our existing `wagtail updatemodulepaths` command for the rename of `wagtail.core` to `wagtail` introduced in wagtail#8011.
  • Loading branch information
kaedroho committed Mar 20, 2022
1 parent 93a1ffe commit 0721b0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wagtail/bin/wagtail.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class UpdateModulePaths(Command):
description = "Update a Wagtail project tree to use Wagtail 2.x module paths"

REPLACEMENTS = [
# Added in Wagtail 2.0
(re.compile(r"\bwagtail\.wagtailcore\b"), "wagtail"),
(re.compile(r"\bwagtail\.wagtailadmin\b"), "wagtail.admin"),
(re.compile(r"\bwagtail\.wagtaildocs\b"), "wagtail.documents"),
Expand Down Expand Up @@ -149,6 +150,8 @@ class UpdateModulePaths(Command):
re.compile(r"\bwagtail\.contrib\.wagtailstyleguide\b"),
"wagtail.contrib.styleguide",
),
# Added in Wagtail 3.0
(re.compile(r"\bwagtail\.core\b"), "wagtail"),
]

def add_arguments(self, parser):
Expand Down

0 comments on commit 0721b0e

Please sign in to comment.