8000 fix: Django 5 only allows POST requests to log out by fsbraun · Pull Request #7728 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Django 5 only allows POST requests to log out #7728

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 2 commits into from
Dec 23, 2023
Merged
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
Next Next commit
Django 5 only allows POST requests to log out
  • Loading branch information
fsbraun committed Dec 22, 2023
commit 8838dcb822d75cc70c96741bea102b3c14dcac78
3 changes: 2 additions & 1 deletion cms/cms_toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from cms.toolbar_base import CMSToolbar
from cms.toolbar_pool import toolbar_pool
from cms.utils import get_language_from_request, page_permissions
from cms.utils.compat import DJANGO_4_2
from cms.utils.conf import get_cms_setting
from cms.utils.i18n import get_language_dict, get_language_tuple
from cms.utils.page_permissions import (
Expand Down Expand Up @@ -343,7 +344,7 @@ def add_logout_button(self, parent):
action=admin_reverse('logout'),
active=True,
on_success=on_success,
method='GET',
method='GET' if DJANGO_4_2 else 'POST',
)

def add_language_menu(self):
Expand Down
0