#25392: Allow contrib.auth to work without sessions
------------------------------+--------------------------------------
Reporter: rdaysky | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Comment (by collinanderson):
Would it work to just set request.user = user and not use login() at all?
It sounds like you want to manually attach a user to a request without
using django at all.
It's also pretty easy to swap in your own subclass of the middleware like
shown above, without needing to modify django.
Also, django handles the session and user lazily, so if request.SESSION is
not accessed, the session table is never queried, and if request.user is
never accessed, then the user table won't be automatically queried, and
request.SESSION won't be accessed. They're only queried as needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/25392#comment:8>
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/065.69a0a0df0c0a4f51f112a6f598448ff7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.