documentcloud
documentcloud copied to clipboard
More granular deactivation emails
Split it up by Add-On maybe
./documentcloud/addons/models.py:478: template="addons/email/disabled.html", The addon model is where the disable function happens and a template is provided for the email. ./documentcloud/templates/addons/email/disabled.html:7
We can create a new template for certain Add-Ons (like Scraper and Klaxon) and leave the rest of the scheduled Add-Ons to run under the default template. We can create a conditional or dictionary depending on what the addon_id is to determine which template to use for the email.
I don't think we should hard code custom templates for certain add-ons - we want users to be able to add their own custom templates to their own arbitrary add-ons. Here is one proposal: We add one generic template, which may have one or more fields which can be filled in. In the config.yaml file we add some number of fields for customizing this template (Maybe just one text field, or maybe a header and footer). If these fields are not present, we use the current template. If they are present, we use the generic template with the text filled in from the config file. I think this gives a simple way for add-ons to customize their own disable emails that is usable by third party add-ons as well.
Makes sense to me, allows for more customization in the future.