Mandrill requires template_content field for send-template.

Fixes #47.
This commit is contained in:
medmunds
2013-10-19 11:41:20 -07:00
parent 43dd289a16
commit f565a4c294
2 changed files with 3 additions and 4 deletions

View File

@@ -76,9 +76,8 @@ class DjrillBackend(BaseEmailBackend):
if hasattr(message, 'template_name'):
api_url = self.api_send_template
api_params['template_name'] = message.template_name
if hasattr(message, 'template_content'):
api_params['template_content'] = \
self._expand_merge_vars(message.template_content)
api_params['template_content'] = \
self._expand_merge_vars(getattr(message, 'template_content', {}))
response = requests.post(api_url, data=json.dumps(api_params))