Simplified and corrected LOGIN_URL, LOGIN_REDIRECT_URL, and LOGOUT_REDIRECT_URL docs.
This commit is contained in:
parent
f09b0f6483
commit
b709d70130
|
@ -2774,15 +2774,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
|
||||||
|
|
||||||
|
@ -2791,12 +2785,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
|
||||||
|
|
||||||
|
@ -2805,17 +2798,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…
Reference in New Issue