I was wondering if I could eliminate django session calls for specific views. For example, if I have a password reset form I don’t want a call to the DB to check for a session or not. Thanks!
I was wondering if I could eliminate django session calls for specific views. For
Share
Sessions are lazily loaded: if you don’t use the session during a request, Django won’t load it.
This includes request.user: if you access it, it accesses the session to find the user. (It loads lazily, too–if you don’t access request.user, it won’t access the session, either.)
So, figure out what’s accessing the session and eliminate it–and if you can’t, at least you’ll know why the session is being pulled in.