mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[2.2.x] Simplified and corrected LOGIN_URL, LOGIN_REDIRECT_URL, and LOGOUT_REDIRECT_URL docs.
Backport of b709d701303b3877387020c1558a590713b09853 from master.
This commit is contained in:
parent
5911d25916
commit
8eb913eabf
@ -2793,15 +2793,9 @@ The model to use to represent a User. See :ref:`auth-custom-user`.
|
|||||||
|
|
||||||
Default: ``'/accounts/profile/'``
|
Default: ``'/accounts/profile/'``
|
||||||
|
|
||||||
The URL where requests are redirected after login when the
|
The URL or :ref:`named URL pattern <naming-url-patterns>` where requests are
|
||||||
``contrib.auth.login`` view gets no ``next`` parameter.
|
redirected after login when the :class:`~django.contrib.auth.views.LoginView`
|
||||||
|
doesn't get a ``next`` GET 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).
|
|
||||||
|
|
||||||
.. setting:: LOGIN_URL
|
.. setting:: LOGIN_URL
|
||||||
|
|
||||||
@ -2810,12 +2804,11 @@ the URL in two places (``settings`` and URLconf).
|
|||||||
|
|
||||||
Default: ``'/accounts/login/'``
|
Default: ``'/accounts/login/'``
|
||||||
|
|
||||||
The URL where requests are redirected for login, especially when using the
|
The URL or :ref:`named URL pattern <naming-url-patterns>` where requests are
|
||||||
:func:`~django.contrib.auth.decorators.login_required` decorator.
|
redirected for login when using the
|
||||||
|
:func:`~django.contrib.auth.decorators.login_required` decorator,
|
||||||
This setting also accepts :ref:`named URL patterns <naming-url-patterns>` which
|
:class:`~django.contrib.auth.mixins.LoginRequiredMixin`, or
|
||||||
can be used to reduce configuration duplication since you don't have to define
|
:class:`~django.contrib.auth.mixins.AccessMixin`.
|
||||||
the URL in two places (``settings`` and URLconf).
|
|
||||||
|
|
||||||
.. setting:: LOGOUT_REDIRECT_URL
|
.. setting:: LOGOUT_REDIRECT_URL
|
||||||
|
|
||||||
@ -2824,17 +2817,13 @@ the URL in two places (``settings`` and URLconf).
|
|||||||
|
|
||||||
Default: ``None``
|
Default: ``None``
|
||||||
|
|
||||||
The URL where requests are redirected after a user logs out using
|
The URL or :ref:`named URL pattern <naming-url-patterns>` where requests are
|
||||||
:class:`~django.contrib.auth.views.LogoutView` (if the view doesn't get a
|
redirected after logout if :class:`~django.contrib.auth.views.LogoutView`
|
||||||
``next_page`` argument).
|
doesn't have a ``next_page`` attribute.
|
||||||
|
|
||||||
If ``None``, no redirect will be performed and the logout view will be
|
If ``None``, no redirect will be performed and the logout view will be
|
||||||
rendered.
|
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
|
.. setting:: PASSWORD_RESET_TIMEOUT_DAYS
|
||||||
|
|
||||||
``PASSWORD_RESET_TIMEOUT_DAYS``
|
``PASSWORD_RESET_TIMEOUT_DAYS``
|
||||||
|
Loading…
x
Reference in New Issue
Block a user