Remember me for login

1
2
3
4
5
def login(request, *args, **kwargs):
    if request.method == 'POST':
        if not request.POST.get('remember_me', None):
            request.session.set_expiry(0)
    return auth_views.login(request, *args, **kwargs)

More like this

  1. Clear session data on login and logout by jb0t 5 years, 1 month ago
  2. RefreshSessionMiddleware by jcassee 4 years, 9 months ago
  3. Clean spam from comments by running management command and akismet by iElectric 7 months ago
  4. Debug middleware for displaying sql queries and template loading info when ?debug=true by SEJeff 2 years, 1 month ago
  5. SelectRelatedManager by realmac 1 year, 8 months ago

Comments

abhinav (on May 1, 2013):

where to write this function?

#

(Forgotten your password?)