#35670: Unclear docs for LoginRequiredMiddleware.get_login_url()
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/35670>
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/010701914754f669-0bf0aed2-84ae-495b-afd9-aabb4a48f335-000000%40eu-central-1.amazonses.com.