Created
November 25, 2016 07:03
-
-
Save DonerKebab/d4038330f9330e0920865cb25cb3c684 to your computer and use it in GitHub Desktop.
django: login remember me
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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