Correct name/content lists for template_content, merge_vars, global_merge_vars.

Fixes #24.
This commit is contained in:
medmunds
2013-01-13 08:16:40 -08:00
parent 6480e4f361
commit ed3249cede
3 changed files with 13 additions and 13 deletions

View File

@@ -173,12 +173,12 @@ class DjrillBackend(BaseEmailBackend):
def _expand_merge_vars(self, vars):
"""Convert a Python dict to an array of name-value used by Mandrill.
"""Convert a Python dict to an array of name-content used by Mandrill.
{ name: value, ... } --> [ {'name': name, 'value': value }, ... ]
{ name: value, ... } --> [ {'name': name, 'content': value }, ... ]
"""
# For testing reproducibility, we sort the keys
return [ { 'name': name, 'value': vars[name] }
return [ { 'name': name, 'content': vars[name] }
for name in sorted(vars.keys()) ]
def _add_alternatives(self, message, msg_dict):