#35670: Unclear docs for LoginRequiredMiddleware.get_login_url()
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Aditya
Type: | Chaudhary
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):
* severity: Normal => Release blocker
Old description:
> I'm struggling to understand the second sentence of the documentation of
> LoginRequiredMiddleware.get_login_url()
> (https://docs.djangoproject.com/en/5.1/ref/middleware/#django.contrib.auth.middleware.get_login_url).
>
> `If defined, this returns the login_url set on the login_required()
> decorator. Defaults to settings.LOGIN_URL.`
>
> After many reads, I think I get the point of the `If defined` that means
> if the `login_required() defines login_url, then... I'm sure we can do
> better. Same issue with the docs for `get_redirect_field_name()` below.
New description:
I'm struggling to understand the second sentence of the documentation of
LoginRequiredMiddleware.get_login_url()
(https://docs.djangoproject.com/en/5.1/ref/middleware/#django.contrib.auth.middleware.get_login_url).
`If defined, this returns the login_url set on the login_required()
decorator. Defaults to settings.LOGIN_URL.`
After many reads, I think I get the point of the `If defined` that means
if the `login_required() defines login_url, then`...
I'm sure we can do better. Same issue with the docs for
`get_redirect_field_name()` below.
--
Comment:
While this is purely a docs change, it strictly qualifies as a release
blocker since it was introduced in
c7fc9f20b49b5889a9a8f47de45165ac443c1a21.
--
Ticket URL: <https://code.djangoproject.com/ticket/35670#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701924d4b5a9f-0ca23441-6a60-4a85-b921-d4e9620a04d0-000000%40eu-central-1.amazonses.com.