Skip to content
Browse files

Using class attributes for mail subject template

  • Loading branch information...
1 parent bde6079 commit a6f597e28a3c22eef59d5c76b5951f50902b2a86 @julsam julsam committed Sep 21, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 cmsplugin_contact/cms_plugins.py
View
3 cmsplugin_contact/cms_plugins.py
@@ -18,6 +18,7 @@ class ContactPlugin(CMSPluginBase):
render_template = "cmsplugin_contact/contact.html"
form = ContactAdminForm
contact_form = ContactForm
+ subject_template = "cmsplugin_contact/subject.txt"
email_template = "cmsplugin_contact/email.txt"
fieldsets = (
@@ -96,7 +97,7 @@ def send(self, form, site_email):
if not subject:
subject = _('No subject')
email_message = EmailMessage(
- render_to_string("cmsplugin_contact/subject.txt", {
+ render_to_string(self.subject_template, {
'subject': subject,
}),
render_to_string(self.email_template, {

0 comments on commit a6f597e

Please sign in to comment.
Something went wrong with that request. Please try again.