Permalink
Browse files

Merge pull request #19 from julsam/generic_mail_subject

mail subject : using property instead of a hardwritten string
  • Loading branch information...
maccesch committed Sep 21, 2011
2 parents bde6079 + a6f597e commit 7483a246b309cd6bfb3a2c70735deb0e9d5aa52b
Showing with 2 additions and 1 deletion.
  1. +2 −1 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 7483a24

Please sign in to comment.