From be4344f956cb775908f2728321c642bfe152ca0c Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 14 Feb 2022 15:26:47 -0500 Subject: [PATCH] [paperwork] Move email templates to subfolder --- paperwork/certification_emails.py | 6 +++--- .../admin_certifications.dj.html} | 0 .../department_certifications.dj.html} | 0 .../member_certifications.dj.html} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename paperwork/templates/paperwork/{admin_certifications_email.dj.html => email/admin_certifications.dj.html} (100%) rename paperwork/templates/paperwork/{department_certifications_email.dj.html => email/department_certifications.dj.html} (100%) rename paperwork/templates/paperwork/{member_certifications_email.dj.html => email/member_certifications.dj.html} (100%) diff --git a/paperwork/certification_emails.py b/paperwork/certification_emails.py index e6374f5..e82c306 100644 --- a/paperwork/certification_emails.py +++ b/paperwork/certification_emails.py @@ -27,7 +27,7 @@ def make_multipart_email(subject, html_body, to): def make_department_email(department, certifications): - template = loader.get_template("paperwork/department_certifications_email.dj.html") + template = loader.get_template("paperwork/email/department_certifications.dj.html") shop_leads = Member.objects.filter( flags__type="label", flags__name="Shop Lead: " + department ).values_list("first_name", "account_name", "email", named=True) @@ -60,7 +60,7 @@ def department_emails(ordered_queryset): def make_member_email(member, certifications): - template = loader.get_template("paperwork/member_certifications_email.dj.html") + template = loader.get_template("paperwork/email/member_certifications.dj.html") html_body = template.render({"member": member, "certifications": certifications}) @@ -81,7 +81,7 @@ def member_emails(ordered_queryset): def admin_email(ordered_queryset): - template = loader.get_template("paperwork/admin_certifications_email.dj.html") + template = loader.get_template("paperwork/email/admin_certifications.dj.html") html_body = template.render({"certifications": ordered_queryset}) return make_multipart_email( diff --git a/paperwork/templates/paperwork/admin_certifications_email.dj.html b/paperwork/templates/paperwork/email/admin_certifications.dj.html similarity index 100% rename from paperwork/templates/paperwork/admin_certifications_email.dj.html rename to paperwork/templates/paperwork/email/admin_certifications.dj.html diff --git a/paperwork/templates/paperwork/department_certifications_email.dj.html b/paperwork/templates/paperwork/email/department_certifications.dj.html similarity index 100% rename from paperwork/templates/paperwork/department_certifications_email.dj.html rename to paperwork/templates/paperwork/email/department_certifications.dj.html diff --git a/paperwork/templates/paperwork/member_certifications_email.dj.html b/paperwork/templates/paperwork/email/member_certifications.dj.html similarity index 100% rename from paperwork/templates/paperwork/member_certifications_email.dj.html rename to paperwork/templates/paperwork/email/member_certifications.dj.html