From 104be07b8bdf7cb976e03382048cd4e013cd05c8 Mon Sep 17 00:00:00 2001 From: Witeden <58004019+Witeden@users.noreply.github.com> Date: Sun, 19 Apr 2020 17:50:17 +0200 Subject: [PATCH] add Reset Password email subject (#16) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Prudhommeaux Jérémy <jeremy.prudhommeaux@student-cs.fr> --- oser_backend/serializers.py | 2 +- templates/email-reset-template.txt | 6 +++--- templates/subject-reset-template.txt | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 templates/subject-reset-template.txt diff --git a/oser_backend/serializers.py b/oser_backend/serializers.py index 576a486..d153511 100644 --- a/oser_backend/serializers.py +++ b/oser_backend/serializers.py @@ -28,7 +28,7 @@ class PasswordResetSerializer(serializers.Serializer): ###### USE YOUR TEXT FILE ###### 'email_template_name': 'email-reset-template.txt', - + 'subject_template_name': 'subject-reset-template.txt', 'request': request, } self.reset_form.save(**opts) \ No newline at end of file diff --git a/templates/email-reset-template.txt b/templates/email-reset-template.txt index f222d59..fa93338 100644 --- a/templates/email-reset-template.txt +++ b/templates/email-reset-template.txt @@ -1,6 +1,6 @@ {% load i18n %}{% autoescape off %} -{% blocktrans %}Vous recevez ce courriel car vous avez demander à -réinitialiser le mot de passe de votre compte Oser.{% endblocktrans %} +{% blocktrans %}Vous recevez ce courriel car vous avez demandé à +réinitialiser le mot de passe de votre compte OSER.{% endblocktrans %} {% trans "Please go to the following page and choose a new password:" %} {% block reset_link %} @@ -10,6 +10,6 @@ http://localhost:4200{% url 'password_reset_confirm' uidb64=uid token=token %} {% trans "Thanks for using our site!" %} -{% blocktrans %}The Oser team{% endblocktrans %} +{% blocktrans %}La Team OSER {% endblocktrans %} {% endautoescape %} \ No newline at end of file diff --git a/templates/subject-reset-template.txt b/templates/subject-reset-template.txt new file mode 100644 index 0000000..88499bb --- /dev/null +++ b/templates/subject-reset-template.txt @@ -0,0 +1,3 @@ +{% load i18n %}{% autoescape off %} +{% blocktrans %}Réinitialisation du mot de passe de votre compte OSER{% endblocktrans %} +{% endautoescape %} -- GitLab