Opened 11 months ago
Closed 11 months ago
#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/
- in 4.2.8 correct - redirect: http://127.0.0.1:8000/admin/login/?next=/admin/
- in 5.0 not correct - only white screen and in console: "GET /accounts/logout/ HTTP/1.1" 405 0
Change History (1)
comment:1 by , 11 months ago
Component: | Uncategorized → contrib.auth |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Type: | Uncategorized → Bug |
Note:
See TracTickets
for help on using tickets.
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 aPOST
in order to log out and be redirected.