python - Create 'rememeber me' feature in defult django login view -


i want add remember me checkbox login view. using 'django.contrib.auth.views.login' view login. tried putting 'session_cookie_age = 360' , checkbox named "remember_me" after reading related questions. but, didn't help. seems feature isn't there in default login view. or missing something?

of course not in default login view. extend default login form. add remember me feature in extended form, , declare log in url this:

url(r'^login/$',         auth_views.login,         {'template_name': 'your/login/template.html', 'form':yourextendedform},         name='auth_login'), 

also. there many remember me snippets , projects out there. googling , find working example in no time... :https://github.com/jimfmunro/django-remember-me

alan


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -