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

Skip to content

fix: Allow lazy wizard initialization #8266

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 6 commits into from
Jul 7, 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
fix: Wizard pool depr message
  • Loading branch information
fsbraun committed Jun 28, 2025
commit 664dcf71960dc7980f08c49f5bced95487eb4f63
4 changes: 2 additions & 2 deletions cms/wizards/helpers.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import warnings

from cms.utils.compat.warnings import RemovedInDjangoCMS51Warning
from cms.utils.compat.warnings import RemovedInDjangoCMS60Warning

from .wizard_base import get_entries, get_entry # noqa: F401

warnings.warn(
"The cms.wizards.helpers module is deprecated and will be removed in django CMS 5.1. "
"Use cms.wizards.wizard_base.get_entries and cms.wizards.wizard_pool.get_entry instead.",
RemovedInDjangoCMS51Warning,
RemovedInDjangoCMS60Warning,
stacklevel=2,
)
4 changes: 2 additions & 2 deletions cms/wizards/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from cms.utils.i18n import get_site_language_from_request

from .forms import WizardStep1Form, WizardStep2BaseForm, step2_form_factory
from .wizard_pool import wizard_pool
from .wizard_base import get_entry


class WizardCreateView(SessionWizardView):
Expand Down Expand Up @@ -150,7 +150,7 @@ def done(self, form_list, **kwargs):

def get_selected_entry(self):
data = self.get_cleaned_data_for_step('0')
return wizard_pool.get_entry(data['entry'])
return get_entry(data['entry'])

def get_origin_page(self):
data = self.get_cleaned_data_for_step('0')
Expand Down
4 changes: 2 additions & 2 deletions cms/wizards/wizard_pool.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.apps import apps
from django.utils.translation import gettext as _

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

Expand Down Expand Up @@ -44,7 +44,7 @@ def register(self, entry):

warnings.warn(
"Using wizard_pool is deprecated. Use the cms_config instead.",
RemovedInDjangoCMS51Warning,
RemovedInDjangoCMS60Warning,
stacklevel=2,
)
assert isinstance(entry, Wizard), "entry must be an instance of Wizard"
Expand Down
Loading
0