#24126: Consider deprecating the current_app argument of auth views
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: | Version: master
contrib.auth | Keywords: multiple-template-
Severity: Normal | engines
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
All views defined in `django.contrib.auth.views` have the following
structure:
{{{
def view(request, ..., current_app=None, ...):
...
if current_app is not None:
request.current_app = current_app
return TemplateResponse(request, template_name, context)
}}}
As of Django 1.8 `current_app` is set on the `request` object. (This is
debated but no other concrete proposal has been made at this time.)
For consistency the auth views should require the caller to set it on the
`request` instead of passing it in a separate argument.
That would also avoid the risk of conflicts between a `current_app` set on
the `request` and another `current_app` passed in argument. Currently the
latter overrides the former.
--
Ticket URL: <https://code.djangoproject.com/ticket/24126>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.e2e619122839def8785cdf4e3ae5f19f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.