From edf173722f9d14dd32cd8dba381ede5973b52a70 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 9 Mar 2016 00:02:39 +0530 Subject: Forgot Password facility Used django in-built views. Templates overridden. User enters email address and submits. The user receives an email with password reset link(one time link). The link contains a token generate using the current state of the user like user password. The link is verified each time when it is been requested. So the link will be invalid if the user has already changed the password using the link.(since the token is generated using current state of the user.) User resets his password via the link. --- yaksh/urls.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'yaksh/urls.py') diff --git a/yaksh/urls.py b/yaksh/urls.py index ad0a925..d74e244 100644 --- a/yaksh/urls.py +++ b/yaksh/urls.py @@ -1,6 +1,15 @@ from django.conf.urls import patterns, url -urlpatterns = patterns('yaksh.views', +urlpatterns = patterns('django.contrib.auth.views', + url(r'^forgotpassword/$', 'password_reset', name="password_reset"), + url(r'^password_reset/(?P[0-9A-Za-z]+)-(?P.+)/$', + 'password_reset_confirm', name='password_reset_confirm'), + url(r'^password_reset/mail_sent/$', 'password_reset_done', + name='password_reset_done'), + url(r'^password_reset/complete/$', 'password_reset_complete', + name='password_reset_complete'), +) +urlpatterns += patterns('yaksh.views', url(r'^$', 'index'), url(r'^login/$', 'user_login'), url(r'^quizzes/$', 'quizlist_user'), -- cgit