From b9ea327656740c53215eba6d599c2801bf706ce8 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 28 Feb 2021 10:21:47 -0500 Subject: lttr: fixed some bugs with new template variables --- app/lttr/models.py | 2 +- .../lttr/emails/test-friends_html_email.html | 252 +++++++++++++++++++++ .../lttr/emails/test-friends_plain_text_email.txt | 16 ++ 3 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 app/lttr/templates/lttr/emails/test-friends_html_email.html create mode 100644 app/lttr/templates/lttr/emails/test-friends_plain_text_email.txt (limited to 'app') diff --git a/app/lttr/models.py b/app/lttr/models.py index 93d66b6..cc5db66 100644 --- a/app/lttr/models.py +++ b/app/lttr/models.py @@ -76,7 +76,7 @@ class Newsletter(models.Model): return 'lttr/emails/%s_plain_text_email.txt' % self.slug def get_template_html(self): - return 'lttr/emails/%s_html_email.txt' % self.slug + return 'lttr/emails/%s_html_email.html' % self.slug def get_templates(self, action): """ diff --git a/app/lttr/templates/lttr/emails/test-friends_html_email.html b/app/lttr/templates/lttr/emails/test-friends_html_email.html new file mode 100644 index 0000000..0c70654 --- /dev/null +++ b/app/lttr/templates/lttr/emails/test-friends_html_email.html @@ -0,0 +1,252 @@ +{% load typogrify_tags %} + + + + + + + {{object.title}} + + + + + + + + + + + +
+
+ + + + +
+


+ Friends of a Long Year — {{object.get_issue_str}} — {{object.pub_date|date:"F"}} {{object.pub_date|date:"j, Y"}}

+

{{object.title|safe|smartypants}}

+ +
+ + {% include "lib/friends_featured_img.html" with image=object.featured_image %} + +
+
+ + {{object.body_email_html|safe|smartypants}} + +
+
+
+
+ + + + + + + + + + diff --git a/app/lttr/templates/lttr/emails/test-friends_plain_text_email.txt b/app/lttr/templates/lttr/emails/test-friends_plain_text_email.txt new file mode 100644 index 0000000..b145d51 --- /dev/null +++ b/app/lttr/templates/lttr/emails/test-friends_plain_text_email.txt @@ -0,0 +1,16 @@ + +{{ object.email_encode|safe }} + +----- + +You're getting this email because you signed up for + +Scott Gilbertson's (luxagraf)[https://luxagraf.net/] newsletter, + +*Friends of a Long Year* [https://luxagraf.net/newsletter/friends/] + +If you're new, you can explore past letters here: [https://luxagraf.net/newsletter/friends/] + +You can always: Unsubscribe [https://luxagraf.net{{subscriber.unsubscribe_activate_url}}] instantly. + +[https://luxagraf.net/] ✪ [https://luxagraf.net/newsletter/friends/] -- cgit v1.2.3-70-g09d2