Fixed #15619 -- Deprecated log out via GET requests.

Thanks Florian Apolloner for the implementation idea.

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
René Fleschenberg 2020-02-27 17:55:29 +01:00 committed by Mariusz Felisiak
parent d4bf3b4c75
commit eb07b5be0c
6 changed files with 122 additions and 30 deletions

View file

@ -1160,7 +1160,12 @@ implementation details see :ref:`using-the-views`.
.. class:: LogoutView
Logs a user out.
Logs a user out on ``POST`` requests.
.. deprecated:: 4.1
Support for logging out on ``GET`` requests is deprecated and will be
removed in Django 5.0.
**URL name:** ``logout``
@ -1212,7 +1217,7 @@ implementation details see :ref:`using-the-views`.
.. function:: logout_then_login(request, login_url=None)
Logs a user out, then redirects to the login page.
Logs a user out on ``POST`` requests, then redirects to the login page.
**URL name:** No default URL provided
@ -1221,6 +1226,11 @@ implementation details see :ref:`using-the-views`.
* ``login_url``: The URL of the login page to redirect to.
Defaults to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
.. deprecated:: 4.1
Support for logging out on ``GET`` requests is deprecated and will be
removed in Django 5.0.
.. class:: PasswordChangeView
**URL name:** ``password_change``