Custom HTML email renderers and new email style (#991)

* Custom HTML email renderers

* Move inline_css call

* Small fixes

* New HTML mail style for pretix

* Thumbs

* Inlinestyle for notifications

* Documentation

* Set line-height
This commit is contained in:
Raphael Michel
2018-08-16 12:01:23 +02:00
committed by GitHub
parent be3b890e2f
commit 4db4790270
27 changed files with 833 additions and 185 deletions

View File

@@ -1,5 +1,6 @@
from django.conf import settings
from django.template.loader import get_template
from inlinestyler.utils import inline_css
from pretix.base.i18n import language
from pretix.base.models import LogEntry, NotificationSetting, User
@@ -91,7 +92,7 @@ def send_notification_mail(notification: Notification, user: User):
}
tpl_html = get_template('pretixbase/email/notification.html')
body_html = tpl_html.render(ctx)
body_html = inline_css(tpl_html.render(ctx))
tpl_plain = get_template('pretixbase/email/notification.txt')
body_plain = tpl_plain.render(ctx)