registration: add a note about spams (#27097)

This commit is contained in:
Frédéric Péters 2019-06-01 13:17:27 +02:00
parent 59c913ee46
commit bedcbc5a4c
3 changed files with 22 additions and 2 deletions

View File

@ -6,19 +6,36 @@
{% endblock %}
{% block content %}
{% block instructions %}
{% blocktrans with email=request.session.registered_email %}
<p>An email was sent to {{ email }}.</p>
{% endblocktrans %}
{% if account_activation_days > 1 %}
{% blocktrans %}
<p>Follow instruction in this email to continue your registration, this
<p>Follow the instructions in this email to continue your registration, this
email will be valid during {{account_activation_days}} days.</p>
{% endblocktrans %}
{% else %}
{% blocktrans %}
<p>Follow instruction in this email to continue your registration, this
<p>Follow the instructions in this email to continue your registration, this
email will be valid during 24 hours.</p>
{% endblocktrans %}
{% endif %}
{% endblock %}
{% block advice %}
{% blocktrans with from_email=from_email %}
<p>To be sure to receive this email we recommend you to add the
{{ from_email }} email address to your addressbook or list of authorised senders
otherwise the message may end up in your spam folder.</p>
{% endblocktrans %}
{% blocktrans with from_email=from_email %}
<p>If you cannot find the email you should check your spam folder and if
you find it there you should mark it as "non-spam" and add the {{from_email }}
address to your addressbook, this should prevent further emails to be
sorted as spams.</p>
{% endblocktrans %}
{% endblock %}
{% block back %}
<p><a href="{{ next_url }}">{% trans "Back" %}</a></p>
{% endblock %}
{% endblock %}

View File

@ -1124,6 +1124,7 @@ class RegistrationCompleteView(TemplateView):
def get_context_data(self, **kwargs):
kwargs['next_url'] = utils.select_next_url(self.request, settings.LOGIN_REDIRECT_URL)
kwargs['from_email'] = settings.DEFAULT_FROM_EMAIL
return super(RegistrationCompleteView, self).get_context_data(
account_activation_days=settings.ACCOUNT_ACTIVATION_DAYS,
**kwargs)

View File

@ -54,6 +54,8 @@ def test_registration(app, db, settings, mailoutbox, external_redirect):
assert '2 days' in response.text
assert 'testbot@entrouvert.com' in response.text
assert 'spam folder' in response.text
assert settings.DEFAULT_FROM_EMAIL in response.text
assert len(mailoutbox) == 1
link = get_link_from_mail(mailoutbox[0])