forked from JustinWingChungHui/okKindred
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48871c5
commit c7a5a50
Showing
19 changed files
with
266 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
from django.template.loader import get_template | ||
from django.utils import translation | ||
|
||
from django_rest_passwordreset.signals import reset_password_token_created | ||
from django_rest_passwordreset.signals import reset_password_token_created, post_password_reset | ||
|
||
from axes.signals import user_locked_out | ||
|
||
|
@@ -75,3 +75,35 @@ def password_reset_token_created(sender, instance, reset_password_token, *args, | |
fail_silently=False, | ||
html_message=content_html) | ||
|
||
|
||
|
||
@receiver(post_password_reset) | ||
def post_password_reset(user, *args, **kwargs): | ||
""" | ||
Called once user has changed password. Sends email to confirm change | ||
""" | ||
language = user.language | ||
|
||
translation.activate(language) | ||
|
||
subject = translation.ugettext('ok!Kindred Password Successfully Updated') | ||
|
||
content = get_template('auth_api/password_changed_plain.html').render( | ||
{ | ||
'language': language, | ||
'domain' : settings.DOMAIN | ||
}) | ||
|
||
content_html = get_template('auth_api/password_changed.html').render( | ||
{ | ||
'language': language, | ||
'domain' : settings.DOMAIN | ||
}) | ||
|
||
send_mail( | ||
subject, | ||
content, | ||
'[email protected]', | ||
[user.email], | ||
fail_silently=False, | ||
html_message=content_html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% extends "base_email.html" %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
|
||
<p> | ||
{% trans "Congratulations! Your password for ok!Kindred has just been updated." %} | ||
</p> | ||
|
||
<p> | ||
{% trans "You can now login using your new password at:" %} | ||
</p> | ||
|
||
<p> | ||
<a href="{{ domain }}">{{ domain }}</a> | ||
</p> | ||
|
||
<p> | ||
{% trans "If you did not initiate this process, immediately contact us by replying to this email" %} | ||
</p> | ||
|
||
|
||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
{% load i18n %} | ||
|
||
|
||
{% trans "Congratulations! Your password for ok!Kindred has just been updated." %} | ||
|
||
{% trans "You can now login using your new password at:" %} | ||
|
||
<a href="{{ domain }}">{{ domain }}</a> | ||
|
||
{% trans "If you did not initiate this process, immediately contact us by replying to this email" %} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2019-07-17 13:53+0000\n" | ||
"POT-Creation-Date: 2019-07-18 11:53+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -21,6 +21,31 @@ msgstr "" | |
msgid "ok!Kindred Password Reset" | ||
msgstr "ok!Kindred Password Reset" | ||
|
||
#: auth_api/signals.py:89 | ||
#, fuzzy | ||
#| msgid "ok!Kindred Password Reset" | ||
msgid "ok!Kindred Password Successfully Updated" | ||
msgstr "ok!Kindred Password Reset" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:7 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:5 | ||
msgid "Congratulations! Your password for ok!Kindred has just been updated." | ||
msgstr "Congratulations! Your password for ok!Kindred has just been updated." | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:11 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:7 | ||
msgid "You can now login using your new password at:" | ||
msgstr "You can now login using your new password at:" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:19 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:11 | ||
msgid "" | ||
"If you did not initiate this process, immediately contact us by replying to " | ||
"this email" | ||
msgstr "" | ||
"If you did not initiate this process, immediately contact us by replying to " | ||
"this email" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:7 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:4 | ||
msgid "" | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2019-07-17 13:53+0000\n" | ||
"POT-Creation-Date: 2019-07-18 11:53+0000\n" | ||
"PO-Revision-Date: 2015-05-11 08:55+0000\n" | ||
"Last-Translator: b'Anonymous User'\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -23,14 +23,39 @@ msgstr "" | |
msgid "ok!Kindred Password Reset" | ||
msgstr "ok!Kindred Salasanan Nollaus" | ||
|
||
#: auth_api/signals.py:89 | ||
#, fuzzy | ||
#| msgid "ok!Kindred Password Reset" | ||
msgid "ok!Kindred Password Successfully Updated" | ||
msgstr "ok!Kindred Salasanan Nollaus" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:7 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:5 | ||
msgid "Congratulations! Your password for ok!Kindred has just been updated." | ||
msgstr "Onnittelut! Salasanasi ok!Kindred on juuri päivitetty" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:11 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:7 | ||
msgid "You can now login using your new password at:" | ||
msgstr "Nyt voit kirjautua uuden salasanasi avulla osoitteeseen:" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:19 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:11 | ||
msgid "" | ||
"If you did not initiate this process, immediately contact us by replying to " | ||
"this email" | ||
msgstr "" | ||
"Jos et käynnistä tätä prosessia, ota välittömästi yhteyttä meihin vastaamalla" | ||
"Tämä sähköposti" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:7 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:4 | ||
msgid "" | ||
"You're receiving this email because you requested a password reset for your " | ||
"user account at ok!Kindred" | ||
msgstr "" | ||
"Saat tämän sähköpostiviestin, koska olet pyytänyt salasanan palauttamista" | ||
"käyttäjätili ok!Kindred" | ||
"Saat tämän sähköpostiviestin, koska olet pyytänyt salasanan " | ||
"palauttamistakäyttäjätili ok!Kindred" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:11 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:6 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2019-07-17 13:53+0000\n" | ||
"POT-Creation-Date: 2019-07-18 11:53+0000\n" | ||
"PO-Revision-Date: 2015-05-11 08:53+0000\n" | ||
"Last-Translator: b'Anonymous User'\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -20,17 +20,42 @@ msgstr "" | |
"X-Translated-Using: django-rosetta 0.7.5\n" | ||
|
||
#: auth_api/signals.py:54 | ||
msgid "Réinitialiser votre Mot de Passe ok!Kindred" | ||
msgid "ok!Kindred Password Reset" | ||
msgstr "" | ||
|
||
#: auth_api/signals.py:89 | ||
#, fuzzy | ||
#| msgid "ok!Kindred family update" | ||
msgid "ok!Kindred Password Successfully Updated" | ||
msgstr "ok! Kindred mise à jour de la famille" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:7 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:5 | ||
msgid "Congratulations! Your password for ok!Kindred has just been updated." | ||
msgstr "Félicitations! Votre mot de passe pour ok!Kindred vient d'être mis à jour." | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:11 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:7 | ||
msgid "You can now login using your new password at:" | ||
msgstr "Vous pouvez maintenant vous connecter en utilisant votre nouveau mot de passe à:" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:19 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:11 | ||
msgid "" | ||
"If you did not initiate this process, immediately contact us by replying to " | ||
"this email" | ||
msgstr "" | ||
"Si vous n'avez pas lancé ce processus, contactez-nous immédiatement en répondant à" | ||
"cet e-mail" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:7 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:4 | ||
msgid "" | ||
"You're receiving this email because you requested a password reset for your " | ||
"user account at ok!Kindred" | ||
msgstr "" | ||
"Vous recevez cet email car vous avez demandé une réinitialisation du mot de passe pour votre" | ||
"compte utilisateur à ok!Kindred" | ||
"Vous recevez cet email car vous avez demandé une réinitialisation du mot de " | ||
"passe pour votrecompte utilisateur à ok!Kindred" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:11 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:6 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2019-07-17 13:53+0000\n" | ||
"POT-Creation-Date: 2019-07-18 11:53+0000\n" | ||
"PO-Revision-Date: 2015-06-08 21:45+0000\n" | ||
"Last-Translator: b'Anonymous User'\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -24,14 +24,39 @@ msgstr "" | |
msgid "ok!Kindred Password Reset" | ||
msgstr "ok!Kindred Zresetowanie Hasła" | ||
|
||
#: auth_api/signals.py:89 | ||
#, fuzzy | ||
#| msgid "ok!Kindred Password Reset" | ||
msgid "ok!Kindred Password Successfully Updated" | ||
msgstr "ok!Kindred Zresetowanie Hasła" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:7 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:5 | ||
msgid "Congratulations! Your password for ok!Kindred has just been updated." | ||
msgstr "Gratulacje! Twoje hasło na ok!Kindred zostało właśnie zaktualizowane." | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:11 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:7 | ||
msgid "You can now login using your new password at:" | ||
msgstr "Możesz teraz zalogować się przy użyciu nowego hasła pod adresem:" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:19 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:11 | ||
msgid "" | ||
"If you did not initiate this process, immediately contact us by replying to " | ||
"this email" | ||
msgstr "" | ||
"Jeśli nie zainicjowałeś tego procesu, natychmiast skontaktuj się z nami, odpowiadając na" | ||
"ten email" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:7 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:4 | ||
msgid "" | ||
"You're receiving this email because you requested a password reset for your " | ||
"user account at ok!Kindred" | ||
msgstr "" | ||
"Otrzymujesz ten e-mail, ponieważ zażądałeś zresetowania hasła dla swojego „" | ||
"konto użytkownika w ok!Kindred" | ||
"Otrzymujesz ten e-mail, ponieważ zażądałeś zresetowania hasła dla swojego " | ||
"„konto użytkownika w ok!Kindred" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:11 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:6 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2019-07-17 13:53+0000\n" | ||
"POT-Creation-Date: 2019-07-18 11:53+0000\n" | ||
"PO-Revision-Date: 2015-06-15 04:58+0000\n" | ||
"Last-Translator: b'Anonymous User <[email protected]>'\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -22,14 +22,37 @@ msgstr "" | |
msgid "ok!Kindred Password Reset" | ||
msgstr "ok!Kindred 重设密码" | ||
|
||
#: auth_api/signals.py:89 | ||
#, fuzzy | ||
#| msgid "ok!Kindred Password Reset" | ||
msgid "ok!Kindred Password Successfully Updated" | ||
msgstr "ok!Kindred 重设密码" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:7 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:5 | ||
msgid "Congratulations! Your password for ok!Kindred has just been updated." | ||
msgstr "恭喜! 您的密码 ok!Kindred 刚刚更新。" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:11 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:7 | ||
msgid "You can now login using your new password at:" | ||
msgstr "您现在可以使用新密码登录:" | ||
|
||
#: auth_api/templates/auth_api/password_changed.html:19 | ||
#: auth_api/templates/auth_api/password_changed_plain.html:11 | ||
msgid "" | ||
"If you did not initiate this process, immediately contact us by replying to " | ||
"this email" | ||
msgstr "您现在可以使用新密码登录:" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:7 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:4 | ||
msgid "" | ||
"You're receiving this email because you requested a password reset for your " | ||
"user account at ok!Kindred" | ||
msgstr "" | ||
"您收到此电子邮件是因为您要求重置密码" | ||
"用户帐户 ok!Kindred" | ||
"如果您没有启动此过程,请立即通过回复与我们联系" | ||
"这封电子邮件" | ||
|
||
#: auth_api/templates/auth_api/password_reset.html:11 | ||
#: auth_api/templates/auth_api/password_reset_plain.html:6 | ||
|
Binary file not shown.
Oops, something went wrong.