From 4bbe761215dbe989e8b2efc3823740416f403e71 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 25 Jun 2020 18:18:20 +0200 Subject: reset password and decorators for login check --- templates/registration/password_reset_complete.html | 7 +++++++ templates/registration/password_reset_confirm.html | 17 +++++++++++++++++ templates/registration/password_reset_done.html | 12 ++++++++++++ templates/registration/password_reset_email.html | 12 ++++++++++++ templates/registration/password_reset_form.html | 10 ++++++++++ templates/registration/password_reset_subject.txt | 1 + 6 files changed, 59 insertions(+) create mode 100644 templates/registration/password_reset_complete.html create mode 100644 templates/registration/password_reset_confirm.html create mode 100644 templates/registration/password_reset_done.html create mode 100644 templates/registration/password_reset_email.html create mode 100644 templates/registration/password_reset_form.html create mode 100644 templates/registration/password_reset_subject.txt (limited to 'templates/registration') diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..c0bccc1 --- /dev/null +++ b/templates/registration/password_reset_complete.html @@ -0,0 +1,7 @@ +{% extends 'registration/base_simple.html' %} + +{% block content %} +

+ Your password has been set. You may go ahead and sign in now. +

+{% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..6838eb8 --- /dev/null +++ b/templates/registration/password_reset_confirm.html @@ -0,0 +1,17 @@ +{% extends 'registration/base_simple.html' %} + +{% block content %} + {% if validlink %} +

Change password

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

+ The password reset link was invalid, possibly because it has already been used. + Please request a new password reset. +

+ {% endif %} +{% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html new file mode 100644 index 0000000..6abc3e1 --- /dev/null +++ b/templates/registration/password_reset_done.html @@ -0,0 +1,12 @@ +{% extends 'registration/base_simple.html' %} + +{% block content %} +

+ We've emailed you instructions for setting your password, if an account exists with the email you entered. + You should receive them shortly. +

+

+ If you don't receive an email, please make sure you've entered the address you registered with, + and check your spam folder. +

+{% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html new file mode 100644 index 0000000..da2c169 --- /dev/null +++ b/templates/registration/password_reset_email.html @@ -0,0 +1,12 @@ +{% autoescape off %} +To initiate the password reset process for your {{ user.get_username }} TestSite Account, +click the link below: + +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} + +If clicking the link above doesn't work, please copy and paste the URL in a new browser +window instead. + +Sincerely, +The TestSite Team +{% endautoescape %} \ No newline at end of file diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html new file mode 100644 index 0000000..d0d6250 --- /dev/null +++ b/templates/registration/password_reset_form.html @@ -0,0 +1,10 @@ +{% extends 'registration/base_simple.html' %} + +{% block content %} +

Forgot password

+
+ {% csrf_token %} + {{ form.as_p }} + +
+{% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_subject.txt b/templates/registration/password_reset_subject.txt new file mode 100644 index 0000000..7b5a65b --- /dev/null +++ b/templates/registration/password_reset_subject.txt @@ -0,0 +1 @@ +TestSite password reset \ No newline at end of file -- cgit v1.2.1