From 153d9a78be92f2f713f881be2be3ecb9c7897624 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 28 Dec 2020 14:20:32 -0500 Subject: [PATCH] fixing some failing tests in the email logic, due to changes in the static asset paths. --- communicator/services/notification_service.py | 6 +++--- communicator/templates/pages/invitation_email.html | 2 +- communicator/templates/pages/result_email.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/communicator/services/notification_service.py b/communicator/services/notification_service.py index 11e426c..f344014 100644 --- a/communicator/services/notification_service.py +++ b/communicator/services/notification_service.py @@ -81,13 +81,13 @@ class NotificationService(object): link = self.get_link(sample) subject = "UVA: BE SAFE Notification" tracking_code = self._tracking_code() - text_body = render_template("result_email.txt", + text_body = render_template("pages/result_email.txt", link=link, base_url=self.URL_ROOT, sample=sample, tracking_code=tracking_code) - html_body = render_template("result_email.html", + html_body = render_template("pages/result_email.html", link=link, base_url=self.URL_ROOT, sample=sample, @@ -162,7 +162,7 @@ class NotificationService(object): # Embed the logo image # This example assumes the image is in the current directory - fp = open(join(app.root_path, 'static', 'uva_logo.png'), 'rb') + fp = open(join(app.root_path, 'static', 'assets', 'img', 'brand', 'uva_logo.png'), 'rb') msgImage = MIMEImage(fp.read()) fp.close() # Define the image's ID as referenced above diff --git a/communicator/templates/pages/invitation_email.html b/communicator/templates/pages/invitation_email.html index 2e3e946..5d40062 100644 --- a/communicator/templates/pages/invitation_email.html +++ b/communicator/templates/pages/invitation_email.html @@ -1,4 +1,4 @@ -{% extends "base_email.html" %} +{% extends "pages/base_email.html" %} {% block content %}

Dear Student, diff --git a/communicator/templates/pages/result_email.html b/communicator/templates/pages/result_email.html index 38009c6..633ccee 100644 --- a/communicator/templates/pages/result_email.html +++ b/communicator/templates/pages/result_email.html @@ -1,4 +1,4 @@ -{% extends "base_email.html" %} +{% extends "pages/base_email.html" %} {% block content %}

You have a new notification from the University of Virginia saliva screening system.