I need to implement a "Remember me" button in a login form that uses the django-registration app. Any ane can help me showing me the way for do this?
Thanks
To implement "remember me" functionality, simply configure whatever default session length you prefer in your settings.py, and after user login call request. session. set_expiry with some large number of seconds if the user has checked the "remember me" box. No extra middleware is needed.
how to remember username and password in django login using remember_me option in django.
Create a login form that has two input elements for entering username and password, a submit button, and a checkbox for Remember me. encryptCookie() – This function takes a single parameter. Generate random key and assign to $key.
One way to do it is to change the session expiration date. This snippet gives an example: http://www.djangosnippets.org/snippets/1881/
Apparently, there's module for that:
http://code.google.com/p/django-remember-me/
I haven't used it but it came up during my search.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With