diff options
author | prathamesh | 2017-02-01 13:00:34 +0530 |
---|---|---|
committer | prathamesh | 2017-02-01 13:00:34 +0530 |
commit | 8427da2f08ae590b427027abe36351018c685f8e (patch) | |
tree | f6cf886524d6715f35d27a6221934769eb95f3e8 /yaksh/urls_password_reset.py | |
parent | a64b9c30f2cd4554734bba16b0aad7647475000d (diff) | |
download | online_test-8427da2f08ae590b427027abe36351018c685f8e.tar.gz online_test-8427da2f08ae590b427027abe36351018c685f8e.tar.bz2 online_test-8427da2f08ae590b427027abe36351018c685f8e.zip |
Forgot Password and Reset Issue Resolved
The problem was:
We have included yaksh urls to the project urls with the namespace
"yaksh".
So whenever we call the url name i.e "yaksh:<url>" a reverse match is
made.
But for Forgot Password and Change Password we are using django's
in-built functionality, where the reverse url is hardcoded.
So the reverse match fails as the namespace is not specified!
To resolve this, created a urls_password_reset URL dispatcher file and
included to the project urls.
Diffstat (limited to 'yaksh/urls_password_reset.py')
-rw-r--r-- | yaksh/urls_password_reset.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/yaksh/urls_password_reset.py b/yaksh/urls_password_reset.py new file mode 100644 index 0000000..c1e36c6 --- /dev/null +++ b/yaksh/urls_password_reset.py @@ -0,0 +1,20 @@ +from django.conf.urls import patterns, url +from django.contrib.auth.views import password_reset, password_reset_confirm,\ + password_reset_done, password_reset_complete, password_change,\ + password_change_done + +urlpatterns = [ + url(r'^forgotpassword/$', password_reset, + name="password_reset"), + url(r'^password_reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', + 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'), + url(r'^changepassword/$', password_change, + name='password_change'), + url(r'^password_change/done/$', password_change_done, + name='password_change_done'), +] |