Skip to content

Instantly share code, notes, and snippets.

@DonerKebab
Created November 25, 2016 07:03
Show Gist options
  • Save DonerKebab/d4038330f9330e0920865cb25cb3c684 to your computer and use it in GitHub Desktop.
Save DonerKebab/d4038330f9330e0920865cb25cb3c684 to your computer and use it in GitHub Desktop.
django: login remember me
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment