Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-registration "remember me"

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

like image 615
z3a Avatar asked May 05 '10 03:05

z3a


People also ask

How do you implement remember me in Django?

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 do I recover my Django username and password?

how to remember username and password in django login using remember_me option in django.

How do I add remember me to my login page?

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.


2 Answers

One way to do it is to change the session expiration date. This snippet gives an example: http://www.djangosnippets.org/snippets/1881/

like image 126
dar Avatar answered Sep 19 '22 19:09

dar


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.

like image 37
mhl666 Avatar answered Sep 21 '22 19:09

mhl666