From 2725f202757694d966d00c413b327bb163fba67f Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 11 Jul 2016 16:07:04 +0530 Subject: changed templates for forgot password and change password --- yaksh/templates/register/password_change_done.html | 16 ++++++++++++++++ yaksh/templates/register/password_change_form.html | 18 ++++++++++++++++++ yaksh/templates/register/password_reset_complete.html | 7 +++++++ yaksh/templates/register/password_reset_confirm.html | 17 +++++++++++++++++ yaksh/templates/register/password_reset_done.html | 4 ++++ yaksh/templates/register/password_reset_form.html | 12 ++++++++++++ yaksh/templates/registration/password_change_done.html | 16 ---------------- yaksh/templates/registration/password_change_form.html | 18 ------------------ .../registration/password_reset_complete.html | 7 ------- .../templates/registration/password_reset_confirm.html | 17 ----------------- yaksh/templates/registration/password_reset_done.html | 4 ---- yaksh/templates/registration/password_reset_form.html | 12 ------------ yaksh/urls.py | 13 +++++++++++-- 13 files changed, 85 insertions(+), 76 deletions(-) create mode 100644 yaksh/templates/register/password_change_done.html create mode 100644 yaksh/templates/register/password_change_form.html create mode 100644 yaksh/templates/register/password_reset_complete.html create mode 100644 yaksh/templates/register/password_reset_confirm.html create mode 100644 yaksh/templates/register/password_reset_done.html create mode 100644 yaksh/templates/register/password_reset_form.html delete mode 100644 yaksh/templates/registration/password_change_done.html delete mode 100644 yaksh/templates/registration/password_change_form.html delete mode 100644 yaksh/templates/registration/password_reset_complete.html delete mode 100644 yaksh/templates/registration/password_reset_confirm.html delete mode 100644 yaksh/templates/registration/password_reset_done.html delete mode 100644 yaksh/templates/registration/password_reset_form.html diff --git a/yaksh/templates/register/password_change_done.html b/yaksh/templates/register/password_change_done.html new file mode 100644 index 0000000..fef07d1 --- /dev/null +++ b/yaksh/templates/register/password_change_done.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}Password change successful{% endblock %} +{% block pagetitle %}Online Test {% endblock %} +{% block script %} + +{% endblock %} +{% block content %} +

Your password has been changed successfully.

+

Redirecting ...

+{% endblock %} \ No newline at end of file diff --git a/yaksh/templates/register/password_change_form.html b/yaksh/templates/register/password_change_form.html new file mode 100644 index 0000000..48292f8 --- /dev/null +++ b/yaksh/templates/register/password_change_form.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %} Change Password {% endblock %} + +{% block pagetitle %} Online Test {% 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 new file mode 100644 index 0000000..0801d3b --- /dev/null +++ b/yaksh/templates/register/password_reset_complete.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% block title %}Password reset complete{% endblock %} +{% block pagetitle %} Online Test {% 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 new file mode 100644 index 0000000..5566499 --- /dev/null +++ b/yaksh/templates/register/password_reset_confirm.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% block title %}Reset Password{% endblock %} +{% block pagetitle %} Online Test {% endblock %} +{% block formtitle %} 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 new file mode 100644 index 0000000..ace3cc9 --- /dev/null +++ b/yaksh/templates/register/password_reset_done.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block title %}Password reset successful{% endblock %} +{% block pagetitle %} Online Test {% endblock %} +{% block formtitle %} 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 new file mode 100644 index 0000000..0dbaf09 --- /dev/null +++ b/yaksh/templates/register/password_reset_form.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block title %} Forgot Password {% endblock %} +{% block pagetitle %} Online Test {% endblock %} +{% block formtitle %} 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 deleted file mode 100644 index fef07d1..0000000 --- a/yaksh/templates/registration/password_change_done.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Password change successful{% endblock %} -{% block pagetitle %}Online Test {% endblock %} -{% block script %} - -{% endblock %} -{% block content %} -

Your password has been changed successfully.

-

Redirecting ...

-{% endblock %} \ No newline at end of file diff --git a/yaksh/templates/registration/password_change_form.html b/yaksh/templates/registration/password_change_form.html deleted file mode 100644 index 48292f8..0000000 --- a/yaksh/templates/registration/password_change_form.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %} Change Password {% endblock %} - -{% block pagetitle %} Online Test {% 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 deleted file mode 100644 index 0801d3b..0000000 --- a/yaksh/templates/registration/password_reset_complete.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} -{% block title %}Password reset complete{% endblock %} -{% block pagetitle %} Online Test {% 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 deleted file mode 100644 index 5566499..0000000 --- a/yaksh/templates/registration/password_reset_confirm.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} -{% block title %}Reset Password{% endblock %} -{% block pagetitle %} Online Test {% endblock %} -{% block formtitle %} 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 deleted file mode 100644 index ace3cc9..0000000 --- a/yaksh/templates/registration/password_reset_done.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "base.html" %} -{% block title %}Password reset successful{% endblock %} -{% block pagetitle %} Online Test {% endblock %} -{% block formtitle %} 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 deleted file mode 100644 index 0dbaf09..0000000 --- a/yaksh/templates/registration/password_reset_form.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base.html" %} -{% block title %} Forgot Password {% endblock %} -{% block pagetitle %} Online Test {% endblock %} -{% block formtitle %} Email will be send to the registered email address {% endblock %} -{% block content %} -
- {% csrf_token %} - {{ form }} - - Cancel -
-{% endblock content %} diff --git a/yaksh/urls.py b/yaksh/urls.py index 7a41f95..cd97dd4 100644 --- a/yaksh/urls.py +++ b/yaksh/urls.py @@ -6,18 +6,27 @@ from django.contrib.auth.views import password_reset, password_reset_confirm,\ # app_name = 'yaksh' urlpatterns = [ - url(r'^forgotpassword/$', password_reset, name="password_reset"), + url(r'^forgotpassword/$', password_reset, + {'template_name': 'register/password_reset_form.html'}, + name="password_reset"), url(r'^password_reset/(?P[0-9A-Za-z]+)-(?P.+)/$', - password_reset_confirm, name='password_reset_confirm'), + password_reset_confirm, + {'template_name': 'register/password_reset_confirm.html'}, + name='password_reset_confirm'), url(r'^password_reset/mail_sent/$', password_reset_done, + {'template_name': 'register/password_reset_done.html'}, name='password_reset_done'), url(r'^password_reset/complete/$', password_reset_complete, + {'template_name': 'register/password_reset_complete.html'}, name='password_reset_complete'), url(r'^changepassword/$', password_change, + {'template_name': 'register/password_change_form.html'}, name='password_change'), url(r'^password_change/done/$', password_change_done, + {'template_name': 'register/password_change_done.html'}, name='password_change_done'), ] + urlpatterns += [ url(r'^$', views.index), url(r'^login/$', views.user_login, name='login'), -- cgit