Skip to content

Commit

Permalink
refactor(templates/email): Extracted base template
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Oct 10, 2020
1 parent 340f0e8 commit 14108d7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
7 changes: 7 additions & 0 deletions allauth/templates/account/email/base_message.txt
@@ -0,0 +1,7 @@
{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %}

{% block content %}{% endblock %}

{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
{{ site_domain }}{% endblocktrans %}
{% endautoescape %}
12 changes: 5 additions & 7 deletions allauth/templates/account/email/email_confirmation_message.txt
@@ -1,9 +1,7 @@
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name }}!
{% extends "account/email/base_message.txt" %}
{% load account %}
{% load i18n %}

You're receiving this e-mail because user {{ user_display }} has given your e-mail address to register an account on {{ site_domain }}.
{% block content %}{% autoescape off %}{% user_display user as user_display %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}You're receiving this e-mail because user {{ user_display }} has given your e-mail address to register an account on {{ site_domain }}.

To confirm this is correct, go to {{ activate_url }}
{% endblocktrans %}
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you from {{ site_name }}!
{{ site_domain }}{% endblocktrans %}
{% endautoescape %}
To confirm this is correct, go to {{ activate_url }}{% endblocktrans %}{% endautoescape %}{% endblock %}
13 changes: 5 additions & 8 deletions allauth/templates/account/email/password_reset_key_message.txt
@@ -1,12 +1,9 @@
{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name }}!
{% extends "account/email/base_message.txt" %}
{% load i18n %}

You're receiving this e-mail because you or someone else has requested a password for your user account.
{% block content %}{% autoescape off %}{% blocktrans %}You're receiving this e-mail because you or someone else has requested a password for your user account.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}

{{ password_reset_url }}
{{ password_reset_url }}{% if username %}

{% if username %}{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}

{% endif %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
{{ site_domain }}{% endblocktrans %}
{% endautoescape %}
{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}{% endif %}{% endautoescape %}{% endblock %}

0 comments on commit 14108d7

Please sign in to comment.