Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create base email template for easier customizability #1851

Closed
wants to merge 1 commit into from

Conversation

protux
Copy link

@protux protux commented Oct 14, 2017

Hi,

it would be pretty useful to have a base.txt to overwrite for easier extensability, similar to base.html.

There are countries out there (including mine) which demand by law that you have an imprint in every mail you send as an organization.

Right now you need to copy all relevant mail templates into your project and edit every single template. Additionally, you need to repeat that if the mail templates will be updated.

This PR is my suggestion to add a base.txt to templates/ which only contains {% block content %}{% endblock content %}. This way one can add custom stuff (e.g. an imprint).

@coveralls
Copy link

coveralls commented Oct 14, 2017

Coverage Status

Coverage remained the same at 94.145% when pulling 730f62d on protux:email_base_template into 92810c9 on pennersr:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.145% when pulling 730f62d on protux:email_base_template into 92810c9 on pennersr:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.145% when pulling 730f62d on protux:email_base_template into 92810c9 on pennersr:master.

@@ -1,8 +1,8 @@
{% 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 'base.txt' %}{% load account %}{% block content %}{% 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 }}!
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it would be better to have a allauth/templates/account/email/base_message.txt so that it is clear that this base is email message specific, and, it is scoped within the allauth template context.

@pennersr
Copy link
Owner

Closed via 14108d7

@pennersr pennersr closed this Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants