documentcloud icon indicating copy to clipboard operation
documentcloud copied to clipboard

More granular deactivation emails

Open duckduckgrayduck opened this issue 1 year ago • 3 comments

Split it up by Add-On maybe

duckduckgrayduck avatar Dec 18 '23 18:12 duckduckgrayduck

./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.

duckduckgrayduck avatar Apr 08 '24 16:04 duckduckgrayduck

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.

mitchelljkotler avatar Apr 09 '24 15:04 mitchelljkotler

Makes sense to me, allows for more customization in the future.

duckduckgrayduck avatar Apr 09 '24 15:04 duckduckgrayduck