From ab9dee0a56a08d5b7bfd56da0e18db84684fb7c0 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 5 Mar 2012 01:23:19 -0400 Subject: [PATCH] Add configurable default email templates --- apps/mailer/conf/__init__.py | 0 apps/mailer/conf/settings.py | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 apps/mailer/conf/__init__.py create mode 100644 apps/mailer/conf/settings.py diff --git a/apps/mailer/conf/__init__.py b/apps/mailer/conf/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apps/mailer/conf/settings.py b/apps/mailer/conf/settings.py new file mode 100644 index 0000000000..257f2d057d --- /dev/null +++ b/apps/mailer/conf/settings.py @@ -0,0 +1,18 @@ +"""Configuration options for the mailer app""" + +from django.utils.translation import ugettext_lazy as _ + +from smart_settings.api import register_settings + +register_settings( + namespace=u'mailer', + module=u'mailer.conf.settings', + settings=[ + # Links + {'name': u'LINK_SUBJECT_TEMPLATE', 'global_name': u'MAILER_LINK_SUBJECT_TEMPLATE', 'default': 'Link for document: {{ document }}', 'description': _(u'Template for the document link email form subject line.')}, + {'name': u'LINK_BODY_TEMPLATE', 'global_name': u'MAILER_LINK_BODY_TEMPLATE', 'default': 'To access this document click on the following link: {{ link }}

\n\n--------
\nThis email has been sent from Mayan EDMS (http://www.mayan-edms.com)', 'description': _(u'Template for the document link email form body line.')}, + # Attachment + {'name': u'DOCUMENT_SUBJECT_TEMPLATE', 'global_name': u'MAILER_DOCUMENT_SUBJECT_TEMPLATE', 'default': 'Document: {{ document }}', 'description': _(u'Template for the document email form subject line.')}, + {'name': u'DOCUMENT_BODY_TEMPLATE', 'global_name': u'MAILER_DOCUMENT_BODY_TEMPLATE', 'default': 'Attached to this email is the document: {{ document }}

\n\n--------
\nThis email has been sent from Mayan EDMS (http://www.mayan-edms.com)', 'description': _(u'Template for the document email form body line.')}, + ] +)