8000 fix: Allow lazy wizard initialization by fsbraun · Pull Request #8267 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Allow lazy wizard initialization #8267

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

Merged
merged 9 commits into from
Jun 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update node dependencies
  • Loading branch information
fsbraun committed Jun 28, 2025
commit e5bba7913d894e28d659ef77e852f7f1a1a2312a
3 changes: 1 addition & 2 deletions cms/wizards/wizard_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from django.utils.translation import gettext as _

from cms.utils.compat.warnings import RemovedInDjangoCMS50Warning
from cms.wizards.helpers import get_entries, get_entry # noqa: F401
from cms.wizards.wizard_base import Wizard, entry_choices # noqa: F401
from cms.wizards.wizard_base import entry_choices, get_entries, get_entry # noqa: F401


class AlreadyRegisteredException(Exception):
Expand Down Expand Up @@ -47,7 +46,7 @@
RemovedInDjangoCMS50Warning,
stacklevel=2,
)
assert isinstance(entry, Wizard), "entry must be an instance of Wizard"

Check failure on line 49 in cms/wizards/wizard_pool.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F821)

cms/wizards/wizard_pool.py:49:34: F821 Undefined name `Wizard`
if self.is_registered(entry, passive=True):
model = entry.get_model()
raise AlreadyRegisteredException(
Expand All @@ -65,7 +64,7 @@
Returns True if the entry was successfully registered, else False.
"""
# TODO: Add deprecation warning
assert isinstance(entry, Wizard), "entry must be an instance of Wizard"

Check failure on line 67 in cms/wizards/wizard_pool.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F821)

cms/wizards/wizard_pool.py:67:34: F821 Undefined name `Wizard`
if self.is_registered(entry):
del apps.get_app_config('cms').cms_extension.wizards[entry.id]
return True
Expand Down
Loading
Loading
0