Skip to content

Commit

Permalink
Using class attributes for mail subject template
Browse files Browse the repository at this point in the history
  • Loading branch information
julsam committed Sep 21, 2011
1 parent bde6079 commit a6f597e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmsplugin_contact/cms_plugins.py
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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, {
Expand Down

0 comments on commit a6f597e

Please sign in to comment.