diff options
| author | Tim Graham <timograham@gmail.com> | 2019-02-04 10:36:44 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-02-05 20:19:32 -0500 |
| commit | 8eb913eabf98c4808550fb99d2da9364645e62b8 (patch) | |
| tree | be6653b854210c671af03ecc2cbc7e3c7a7282d9 /docs | |
| parent | 5911d25916e41f367fcff8d30253a4fd50f28368 (diff) | |
[2.2.x] Simplified and corrected LOGIN_URL, LOGIN_REDIRECT_URL, and LOGOUT_REDIRECT_URL docs.
Backport of b709d701303b3877387020c1558a590713b09853 from master.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/settings.txt | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index dec8a39269..fa3cc160f7 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -2793,15 +2793,9 @@ The model to use to represent a User. See :ref:`auth-custom-user`. Default: ``'/accounts/profile/'`` -The URL where requests are redirected after login when the -``contrib.auth.login`` view gets no ``next`` parameter. - -This is used by the :func:`~django.contrib.auth.decorators.login_required` -decorator, for example. - -This setting also accepts :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). +The URL or :ref:`named URL pattern <naming-url-patterns>` where requests are +redirected after login when the :class:`~django.contrib.auth.views.LoginView` +doesn't get a ``next`` GET parameter. .. setting:: LOGIN_URL @@ -2810,12 +2804,11 @@ the URL in two places (``settings`` and URLconf). Default: ``'/accounts/login/'`` -The URL where requests are redirected for login, especially when using the -:func:`~django.contrib.auth.decorators.login_required` decorator. - -This setting also accepts :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). +The URL or :ref:`named URL pattern <naming-url-patterns>` where requests are +redirected for login when using the +:func:`~django.contrib.auth.decorators.login_required` decorator, +:class:`~django.contrib.auth.mixins.LoginRequiredMixin`, or +:class:`~django.contrib.auth.mixins.AccessMixin`. .. setting:: LOGOUT_REDIRECT_URL @@ -2824,17 +2817,13 @@ the URL in two places (``settings`` and URLconf). Default: ``None`` -The URL where requests are redirected after a user logs out using -:class:`~django.contrib.auth.views.LogoutView` (if the view doesn't get a -``next_page`` argument). +The URL or :ref:`named URL pattern <naming-url-patterns>` where requests are +redirected after logout if :class:`~django.contrib.auth.views.LogoutView` +doesn't have a ``next_page`` attribute. If ``None``, no redirect will be performed and the logout view will be rendered. -This setting also accepts :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`` |
