mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #12405 -- Added LOGOUT_REDIRECT_URL setting.
After a user logs out via auth.views.logout(), they're redirected to LOGOUT_REDIRECT_URL if no `next_page` argument is provided.
This commit is contained in:
parent
ad216381fc
commit
dcee1dfc79
6 changed files with 43 additions and 1 deletions
|
@ -2642,6 +2642,26 @@ This setting also accepts view function names and :ref:`named URL patterns
|
|||
<naming-url-patterns>` which can be used to reduce configuration duplication
|
||||
since you don't have to define the URL in two places (``settings`` and URLconf).
|
||||
|
||||
.. setting:: LOGOUT_REDIRECT_URL
|
||||
|
||||
``LOGOUT_REDIRECT_URL``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Default: ``None``
|
||||
|
||||
The URL where requests are redirected after a user logs out using the
|
||||
:func:`~django.contrib.auth.views.logout` view (if the view doesn't get a
|
||||
``next_page`` argument).
|
||||
|
||||
If ``None``, no redirect will be performed and the logout view will be
|
||||
rendered.
|
||||
|
||||
This setting also accepts view function names and :ref:`named URL patterns
|
||||
<naming-url-patterns>` which can be used to reduce configuration duplication
|
||||
since you don't have to define the URL in two places (``settings`` and URLconf).
|
||||
|
||||
.. setting:: PASSWORD_RESET_TIMEOUT_DAYS
|
||||
|
||||
``PASSWORD_RESET_TIMEOUT_DAYS``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue