summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/settings.txt20
-rw-r--r--docs/releases/1.10.txt4
-rw-r--r--docs/topics/auth/default.txt4
3 files changed, 27 insertions, 1 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 2101c1c7d4..ab710fffac 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -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``
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index 92f7c1d8e6..7329a6717d 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -82,6 +82,10 @@ Minor features
* Added the optional ``backend`` argument to :func:`~django.contrib.auth.login`
to allow using it without credentials.
+* The new :setting:`LOGOUT_REDIRECT_URL` setting controls the redirect of the
+ :func:`~django.contrib.auth.views.logout` view, if the view doesn't get a
+ ``next_page`` argument.
+
:mod:`django.contrib.contenttypes`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt
index 5b6472f7a3..690d11e3b8 100644
--- a/docs/topics/auth/default.txt
+++ b/docs/topics/auth/default.txt
@@ -1105,7 +1105,9 @@ implementation details see :ref:`using-the-views`.
**Optional arguments:**
- * ``next_page``: The URL to redirect to after logout.
+ * ``next_page``: The URL to redirect to after logout. Defaults to
+ :setting:`settings.LOGOUT_REDIRECT_URL <LOGOUT_REDIRECT_URL>` if not
+ supplied.
* ``template_name``: The full name of a template to display after
logging the user out. Defaults to