From e3e76872a5d981fbc72019150a2ca623af3d0a3d Mon Sep 17 00:00:00 2001 From: Felipe Date: Thu, 29 Jan 2015 10:21:41 +0100 Subject: [PATCH] Fixed Mail object attr instaciation --- shelfzilla/apps/mailing/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shelfzilla/apps/mailing/models.py b/shelfzilla/apps/mailing/models.py index 61c69e6..d762102 100644 --- a/shelfzilla/apps/mailing/models.py +++ b/shelfzilla/apps/mailing/models.py @@ -19,6 +19,10 @@ class Email(object): def __init__(self, context={}): self.from_email = getattr(settings, 'FROM_EMAIL', 'root@localhost') self.context = context + self.recipients = [] + self.template = '' + self.text = '' + self.subject = '' self.prepare() def prepare(self): @@ -27,9 +31,7 @@ class Email(object): def compile_template(self): tmpl = get_template(self.template) self.html = tmpl.render(Context(self.context)) - print(self.html.encode('utf-8')) self.text = strip_tags(self.html) - print(self.text.encode('utf-8')) def send(self): if self.template: