#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:
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>