From 8427da2f08ae590b427027abe36351018c685f8e Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 1 Feb 2017 13:00:34 +0530 Subject: 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:" 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. --- yaksh/templates/register/password_change_done.html | 15 --------------- yaksh/templates/register/password_change_form.html | 16 ---------------- yaksh/templates/register/password_reset_complete.html | 6 ------ yaksh/templates/register/password_reset_confirm.html | 15 --------------- yaksh/templates/register/password_reset_done.html | 3 --- yaksh/templates/register/password_reset_form.html | 10 ---------- yaksh/templates/registration/password_change_done.html | 15 +++++++++++++++ yaksh/templates/registration/password_change_form.html | 16 ++++++++++++++++ .../templates/registration/password_reset_complete.html | 6 ++++++ yaksh/templates/registration/password_reset_confirm.html | 15 +++++++++++++++ yaksh/templates/registration/password_reset_done.html | 3 +++ yaksh/templates/registration/password_reset_form.html | 10 ++++++++++ yaksh/templates/user.html | 2 +- yaksh/templates/yaksh/login.html | 2 +- 14 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 yaksh/templates/register/password_change_done.html delete mode 100644 yaksh/templates/register/password_change_form.html delete mode 100644 yaksh/templates/register/password_reset_complete.html delete mode 100644 yaksh/templates/register/password_reset_confirm.html delete mode 100644 yaksh/templates/register/password_reset_done.html delete mode 100644 yaksh/templates/register/password_reset_form.html create mode 100644 yaksh/templates/registration/password_change_done.html create mode 100644 yaksh/templates/registration/password_change_form.html create mode 100644 yaksh/templates/registration/password_reset_complete.html create mode 100644 yaksh/templates/registration/password_reset_confirm.html create mode 100644 yaksh/templates/registration/password_reset_done.html create mode 100644 yaksh/templates/registration/password_reset_form.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/register/password_change_done.html b/yaksh/templates/register/password_change_done.html deleted file mode 100644 index 14df20c..0000000 --- a/yaksh/templates/register/password_change_done.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{% block pagetitle %}Password change successful{% endblock %} -{% block script %} - -{% endblock %} -{% block content %} -

Your password has been changed successfully.

-

Redirecting ...

-{% endblock %} diff --git a/yaksh/templates/register/password_change_form.html b/yaksh/templates/register/password_change_form.html deleted file mode 100644 index b618410..0000000 --- a/yaksh/templates/register/password_change_form.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} - -{% block pagetitle %} Change Password {% endblock %} - -{% block content %} -
- {% csrf_token %} -
- - {{ form }} -
-
-
-
-
-{% endblock content %} diff --git a/yaksh/templates/register/password_reset_complete.html b/yaksh/templates/register/password_reset_complete.html deleted file mode 100644 index 0c1bae2..0000000 --- a/yaksh/templates/register/password_reset_complete.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "base.html" %} -{% block pagetitle %}Password reset complete{% endblock %} -{% block content %} -

Your password has been reset.

-

Log in

-{% endblock %} diff --git a/yaksh/templates/register/password_reset_confirm.html b/yaksh/templates/register/password_reset_confirm.html deleted file mode 100644 index 1b0a1b7..0000000 --- a/yaksh/templates/register/password_reset_confirm.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} -{% block pagetitle %}Reset Password{% endblock %} - -{% block content %} - {% if validlink %} -

Please enter your new password twice so we can verify you typed it in correctly

. -
- {% csrf_token %} - {{ form.as_p }} - -
- {% else %} -

This reset link is no longer valid!

- {% endif %} -{% endblock %} diff --git a/yaksh/templates/register/password_reset_done.html b/yaksh/templates/register/password_reset_done.html deleted file mode 100644 index 1ac7b60..0000000 --- a/yaksh/templates/register/password_reset_done.html +++ /dev/null @@ -1,3 +0,0 @@ -{% extends "base.html" %} -{% block title %}Password reset successful{% endblock %} -{% block pagetitle %} Instruction for setting new password has been mailed to your registered email address {% endblock %} diff --git a/yaksh/templates/register/password_reset_form.html b/yaksh/templates/register/password_reset_form.html deleted file mode 100644 index 0444584..0000000 --- a/yaksh/templates/register/password_reset_form.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} -{% block pagetitle %} Email will be send to the registered email address {% endblock %} -{% block content %} -
- {% csrf_token %} - {{ form }} - - Cancel -
-{% endblock content %} diff --git a/yaksh/templates/registration/password_change_done.html b/yaksh/templates/registration/password_change_done.html new file mode 100644 index 0000000..14df20c --- /dev/null +++ b/yaksh/templates/registration/password_change_done.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block pagetitle %}Password change successful{% endblock %} +{% block script %} + +{% endblock %} +{% block content %} +

Your password has been changed successfully.

+

Redirecting ...

+{% endblock %} diff --git a/yaksh/templates/registration/password_change_form.html b/yaksh/templates/registration/password_change_form.html new file mode 100644 index 0000000..b618410 --- /dev/null +++ b/yaksh/templates/registration/password_change_form.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block pagetitle %} Change Password {% endblock %} + +{% block content %} +
+ {% csrf_token %} +
+ + {{ form }} +
+
+
+
+
+{% endblock content %} diff --git a/yaksh/templates/registration/password_reset_complete.html b/yaksh/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..0c1bae2 --- /dev/null +++ b/yaksh/templates/registration/password_reset_complete.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% block pagetitle %}Password reset complete{% endblock %} +{% block content %} +

Your password has been reset.

+

Log in

+{% endblock %} diff --git a/yaksh/templates/registration/password_reset_confirm.html b/yaksh/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..1b0a1b7 --- /dev/null +++ b/yaksh/templates/registration/password_reset_confirm.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block pagetitle %}Reset Password{% endblock %} + +{% block content %} + {% if validlink %} +

Please enter your new password twice so we can verify you typed it in correctly

. +
+ {% csrf_token %} + {{ form.as_p }} + +
+ {% else %} +

This reset link is no longer valid!

+ {% endif %} +{% endblock %} diff --git a/yaksh/templates/registration/password_reset_done.html b/yaksh/templates/registration/password_reset_done.html new file mode 100644 index 0000000..1ac7b60 --- /dev/null +++ b/yaksh/templates/registration/password_reset_done.html @@ -0,0 +1,3 @@ +{% extends "base.html" %} +{% block title %}Password reset successful{% endblock %} +{% block pagetitle %} Instruction for setting new password has been mailed to your registered email address {% endblock %} diff --git a/yaksh/templates/registration/password_reset_form.html b/yaksh/templates/registration/password_reset_form.html new file mode 100644 index 0000000..0444584 --- /dev/null +++ b/yaksh/templates/registration/password_reset_form.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% block pagetitle %} Email will be send to the registered email address {% endblock %} +{% block content %} +
+ {% csrf_token %} + {{ form }} + + Cancel +
+{% endblock content %} diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index 6f2137d..6f879fe 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -29,7 +29,7 @@
  • Home
  • Enrolled Courses
  • Profile
  • -
  • Change Password
  • +
  • Change Password
  • diff --git a/yaksh/templates/yaksh/login.html b/yaksh/templates/yaksh/login.html index 0a6fdc1..e4b5933 100644 --- a/yaksh/templates/yaksh/login.html +++ b/yaksh/templates/yaksh/login.html @@ -12,7 +12,7 @@ {{ form.as_table }} - Forgot Password? + Forgot Password? New User? Sign-Up

    Login with

    -- cgit