#35063 closed Bug (invalid)

Django 5 LOGOUT_REDIRECT_URL does not work correctly

Reported by: Koljasha Owned by: nobody
Component: contrib.auth Version: 5.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Procedure, explanation:

  • create default project 'root': django-admin startproject root
  • do migrate: python manage.py migrate
  • createsuperuser: python manage.py createsuperuser
  • add in root/settings.py for example: LOGOUT_REDIRECT_URL = 'admin:index'
  • add in root/urls.py: path('accounts/', include('django.contrib.auth.urls')),
  • after authorization, I do: http://127.0.0.1:8000/accounts/logout/

Change History (1)

comment:1 by Tim Graham, 12 months ago

Component: Uncategorizedcontrib.auth
Resolution: invalid
Status: newclosed
Type: UncategorizedBug

As per the Django 5.0 release notes, support for logging out via GET requests in the django.contrib.auth.views.LogoutView is removed. You must issue a POST in order to log out and be redirected.

Note: See TracTickets for help on using tickets.
Back to Top