diff options
| author | Aditya Chaudhary <113302312+userAdityaa@users.noreply.github.com> | 2024-10-02 21:45:21 +0530 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2024-10-02 13:15:57 -0300 |
| commit | bf64ac3567c892d60d2b157e866c509a37b14918 (patch) | |
| tree | d46098d3055349c84f96052d50361e584794e190 | |
| parent | 53031136f59952a6ef5fcdac889f9190326098c0 (diff) | |
[5.1.x] Fixed #35670 -- Clarified the return value for LoginRequiredMiddleware's methods.
Backport of efc3b0c627f7e3cb4e337280ecd2483758dcb0a5 from main.
| -rw-r--r-- | docs/ref/middleware.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt index 4c7db09947..738b48f548 100644 --- a/docs/ref/middleware.txt +++ b/docs/ref/middleware.txt @@ -560,19 +560,19 @@ unauthenticated requests. .. method:: get_login_url() - Returns the URL that unauthenticated requests will be redirected to. If - defined, this returns the ``login_url`` set on the - :func:`~.django.contrib.auth.decorators.login_required` decorator. Defaults - to :setting:`settings.LOGIN_URL <LOGIN_URL>`. + Returns the URL that unauthenticated requests will be redirected to. This + result is either the ``login_url`` set on the + :func:`~django.contrib.auth.decorators.login_required` decorator (if not + ``None``), or :setting:`settings.LOGIN_URL <LOGIN_URL>`. .. method:: get_redirect_field_name() Returns the name of the query parameter that contains the URL the user - should be redirected to after a successful login. If defined, this returns + should be redirected to after a successful login. This result is either the ``redirect_field_name`` set on the - :func:`~.django.contrib.auth.decorators.login_required` decorator. Defaults - to :attr:`redirect_field_name`. If ``None`` is returned, a query parameter - won't be added. + :func:`~.django.contrib.auth.decorators.login_required` decorator (if not + ``None``), or :attr:`redirect_field_name`. If ``None`` is returned, a query + parameter won't be added. .. class:: RemoteUserMiddleware |
