Fix various problems with emails for account/password
This commit is contained in:
parent
9d989f0549
commit
291f9f0910
7 changed files with 44 additions and 17 deletions
|
@ -107,7 +107,7 @@ EMAIL_HOST = os.getenv('KHAGANAT_EMAIL_HOST', default='localhost')
|
||||||
EMAIL_PORT = int(os.getenv('KHAGANAT_EMAIL_PORT', default='25'))
|
EMAIL_PORT = int(os.getenv('KHAGANAT_EMAIL_PORT', default='25'))
|
||||||
EMAIL_HOST_USER = os.getenv('KHAGANAT_EMAIL_HOST_USER', default='')
|
EMAIL_HOST_USER = os.getenv('KHAGANAT_EMAIL_HOST_USER', default='')
|
||||||
EMAIL_HOST_PASSWORD = os.getenv('KHAGANAT_EMAIL_HOST_PASSWORD', default='')
|
EMAIL_HOST_PASSWORD = os.getenv('KHAGANAT_EMAIL_HOST_PASSWORD', default='')
|
||||||
EMAIL_USE_TLS = os.getenv('KHAGANAT_EMAIL_USE_TLS', default='')
|
EMAIL_USE_TLS = get_config_bool('KHAGANAT_EMAIL_USE_TLS', default=False)
|
||||||
|
|
||||||
EMAIL_SUBJECT_PREFIX = os.getenv('KHAGANAT_EMAIL_SUBJECT_PREFIX', default='')
|
EMAIL_SUBJECT_PREFIX = os.getenv('KHAGANAT_EMAIL_SUBJECT_PREFIX', default='')
|
||||||
DEFAULT_FROM_EMAIL = os.getenv(
|
DEFAULT_FROM_EMAIL = os.getenv(
|
||||||
|
|
|
@ -2,7 +2,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 1.0\n"
|
"Project-Id-Version: 1.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-02-04 01:03+0100\n"
|
"POT-Creation-Date: 2018-02-04 15:56+0100\n"
|
||||||
"PO-Revision-Date: 2018-02-04 01:03+0100\n"
|
"PO-Revision-Date: 2018-02-04 01:03+0100\n"
|
||||||
"Last-Translator: Khaganat <assoc@khaganat.net>\n"
|
"Last-Translator: Khaganat <assoc@khaganat.net>\n"
|
||||||
"Language-Team: Khaganat <assoc@khaganat.net>\n"
|
"Language-Team: Khaganat <assoc@khaganat.net>\n"
|
||||||
|
@ -100,6 +100,7 @@ msgstr "forgotten password"
|
||||||
#: templates/neluser/password_reset.html:4
|
#: templates/neluser/password_reset.html:4
|
||||||
#: templates/neluser/password_reset_confirm.html:4
|
#: templates/neluser/password_reset_confirm.html:4
|
||||||
#: templates/neluser/password_reset_done.html:4
|
#: templates/neluser/password_reset_done.html:4
|
||||||
|
#: templates/neluser/password_reset_email_sent.html:4
|
||||||
msgid "password_reset"
|
msgid "password_reset"
|
||||||
msgstr "password reset"
|
msgstr "password reset"
|
||||||
|
|
||||||
|
@ -136,6 +137,11 @@ msgstr ""
|
||||||
msgid "Please go to the following page and choose a new password:"
|
msgid "Please go to the following page and choose a new password:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: templates/neluser/password_reset_email_sent.html:8
|
||||||
|
msgid "password_reset_success_email"
|
||||||
|
msgstr "An email has been sent to your address. Please follow the link given "
|
||||||
|
"in this email to reset your password."
|
||||||
|
|
||||||
#: templates/neluser/password_reset_email_subject.txt:2
|
#: templates/neluser/password_reset_email_subject.txt:2
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Password reset on %(site_name)s"
|
msgid "Password reset on %(site_name)s"
|
||||||
|
@ -147,8 +153,9 @@ msgstr "Almost there…"
|
||||||
|
|
||||||
#: templates/neluser/register_done.html:10
|
#: templates/neluser/register_done.html:10
|
||||||
msgid "activate_your_account"
|
msgid "activate_your_account"
|
||||||
msgstr "You now need to activate your account. Please click on the link that "
|
msgstr ""
|
||||||
"has been sent to your email address."
|
"You now need to activate your account. Please click on the link that has "
|
||||||
|
"been sent to your email address."
|
||||||
|
|
||||||
#: templates/neluser/register_done.html:11
|
#: templates/neluser/register_done.html:11
|
||||||
msgid "take_me_home"
|
msgid "take_me_home"
|
||||||
|
|
|
@ -2,7 +2,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 1.0\n"
|
"Project-Id-Version: 1.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-02-04 01:03+0100\n"
|
"POT-Creation-Date: 2018-02-04 15:56+0100\n"
|
||||||
"PO-Revision-Date: 2018-02-04 01:03+0100\n"
|
"PO-Revision-Date: 2018-02-04 01:03+0100\n"
|
||||||
"Last-Translator: Khaganat <assoc@khaganat.net>\n"
|
"Last-Translator: Khaganat <assoc@khaganat.net>\n"
|
||||||
"Language-Team: Khaganat <assoc@khaganat.net>\n"
|
"Language-Team: Khaganat <assoc@khaganat.net>\n"
|
||||||
|
@ -68,8 +68,7 @@ msgstr "connexion"
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"You're receiving this email because you created an account at %(site_name)s."
|
"You're receiving this email because you created an account at %(site_name)s."
|
||||||
msgstr ""
|
msgstr "Vous recevez cet email car vous avez créé un compte sur %(site_name)s."
|
||||||
"Vous recevez cet email car vous avez créé un compte sur %(site_name)s."
|
|
||||||
|
|
||||||
#: templates/neluser/activate_email.html:7
|
#: templates/neluser/activate_email.html:7
|
||||||
#: templates/neluser/activate_email.txt:4
|
#: templates/neluser/activate_email.txt:4
|
||||||
|
@ -103,6 +102,7 @@ msgstr "mot de passe oublié"
|
||||||
#: templates/neluser/password_reset.html:4
|
#: templates/neluser/password_reset.html:4
|
||||||
#: templates/neluser/password_reset_confirm.html:4
|
#: templates/neluser/password_reset_confirm.html:4
|
||||||
#: templates/neluser/password_reset_done.html:4
|
#: templates/neluser/password_reset_done.html:4
|
||||||
|
#: templates/neluser/password_reset_email_sent.html:4
|
||||||
msgid "password_reset"
|
msgid "password_reset"
|
||||||
msgstr "réinitialisation du mot de passe"
|
msgstr "réinitialisation du mot de passe"
|
||||||
|
|
||||||
|
@ -139,7 +139,13 @@ msgstr ""
|
||||||
#: templates/neluser/password_reset_email.html:7
|
#: templates/neluser/password_reset_email.html:7
|
||||||
#: templates/neluser/password_reset_email.txt:4
|
#: templates/neluser/password_reset_email.txt:4
|
||||||
msgid "Please go to the following page and choose a new password:"
|
msgid "Please go to the following page and choose a new password:"
|
||||||
msgstr "Veuillez suivre le lien suivant pour réinitialiser votre mot de passe :"
|
msgstr ""
|
||||||
|
"Veuillez suivre le lien suivant pour réinitialiser votre mot de passe :"
|
||||||
|
|
||||||
|
#: templates/neluser/password_reset_email_sent.html:8
|
||||||
|
msgid "password_reset_success_email"
|
||||||
|
msgstr "Un message a été envoyé sur votre messagerie électronique. Veuillez "
|
||||||
|
"suivre le lien donné dans ce message afin de réinitialiser votre mot de passe."
|
||||||
|
|
||||||
#: templates/neluser/password_reset_email_subject.txt:2
|
#: templates/neluser/password_reset_email_subject.txt:2
|
||||||
#, python-format
|
#, python-format
|
||||||
|
@ -152,8 +158,9 @@ msgstr "Vous y êtes presque…"
|
||||||
|
|
||||||
#: templates/neluser/register_done.html:10
|
#: templates/neluser/register_done.html:10
|
||||||
msgid "activate_your_account"
|
msgid "activate_your_account"
|
||||||
msgstr "Vous devez maintenant activer votre compte. Veuillez cliquer sur le "
|
msgstr ""
|
||||||
"lien qui vient d'être envoyé sur votre adresse électronique."
|
"Vous devez maintenant activer votre compte. Veuillez cliquer sur le lien qui "
|
||||||
|
"vient d'être envoyé sur votre adresse électronique."
|
||||||
|
|
||||||
#: templates/neluser/register_done.html:11
|
#: templates/neluser/register_done.html:11
|
||||||
msgid "take_me_home"
|
msgid "take_me_home"
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
{% block title %}{% trans "register" %}{% endblock %}
|
{% block title %}{% trans "register" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="content-bloc">
|
||||||
<div class="alert alert-success" role="alert">
|
<div class="alert alert-success" role="alert">
|
||||||
<p>{% trans 'account_activated' %}</p>
|
<p>{% trans 'account_activated' %}</p>
|
||||||
<a class="btn btn-secondary" href="{% url "login" %}" role="button">{% trans "login"|capfirst %}</a>
|
<a class="btn btn-secondary" href="{% url "login" %}" role="button">{% trans "login"|capfirst %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="content-bloc">
|
<div class="content-bloc">
|
||||||
<div class="alert alert-success" role="alert">{% trans "password_reset_success" %}</div>
|
<div class="alert alert-success" role="alert">
|
||||||
|
<p>{% trans "password_reset_success" %}</p>
|
||||||
|
<a class="btn btn-secondary" href="{% url "login" %}" role="button">{% trans "login"|capfirst %}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
10
neluser/templates/neluser/password_reset_email_sent.html
Normal file
10
neluser/templates/neluser/password_reset_email_sent.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{% extends "khaganat/base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block title %}{% trans "password_reset" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="content-bloc">
|
||||||
|
<div class="alert alert-success" role="alert">{% trans "password_reset_success_email" %}</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
|
@ -43,7 +43,7 @@ urlpatterns = [
|
||||||
path(
|
path(
|
||||||
'forgotten_password/done/',
|
'forgotten_password/done/',
|
||||||
auth_views.PasswordResetDoneView.as_view(
|
auth_views.PasswordResetDoneView.as_view(
|
||||||
template_name='neluser/password_reset_done.html'
|
template_name='neluser/password_reset_email_sent.html'
|
||||||
),
|
),
|
||||||
name='password_reset_done'
|
name='password_reset_done'
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue