-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the email digests template into Python/Jinja2
Move the email digests template from Mailchimp into Python/Jinja2. This involves: 1. Creating a new Jinja2 template for the email at `lms/templates/email/instructor_email_digest/` based on the template that we previously had in Mailchimp. This is basically exactly the same as the template that we have in Mailchimp except that I fixed the formatting/indentation and I replaced Mailchimp's template tags with Jinja2 ones. 2. Adding a new `MailchimpService.send()` method (instead of the existing `MailchimpService.send_template()`) that uses Jinja2 to render the new template and then calls the Mailchimp API passing the rendered text to send the email. 3. Adding a new Celery task `send()` (instead of the existing `send_template()` task) that calls `MailchimpService.send()` instead of `send_template()`. 4. Changing `DigestService` to call the new `send()` task instead of the old `send_template()` task when sending digest emails. I also added one image file that was previously hosted on Mailchimp into our app's static files. The new email template references this file. The original `MailchimpService.send_template()` method and `send_template()` Celery task are still present: these will be needed in case there are any `send_template` messages remaining on the queue. A follow-up commit will remove these methods and their tests once the queue has been drained.
- Loading branch information
Showing
9 changed files
with
991 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.