From 97fb08ab0829b6d15fcbf31fcacb65e19ed1097d Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 25 Jul 2013 12:56:37 -0400 Subject: [PATCH] Make mitxmako.render_to_response not require a dictionary argument --- common/djangoapps/mitxmako/shortcuts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/mitxmako/shortcuts.py b/common/djangoapps/mitxmako/shortcuts.py index 7f7c3f9ebe..3c68fa85be 100644 --- a/common/djangoapps/mitxmako/shortcuts.py +++ b/common/djangoapps/mitxmako/shortcuts.py @@ -92,9 +92,10 @@ def render_to_string(template_name, dictionary, context=None, namespace='main'): return template.render_unicode(**context_dictionary) -def render_to_response(template_name, dictionary, context_instance=None, namespace='main', **kwargs): +def render_to_response(template_name, dictionary=None, context_instance=None, namespace='main', **kwargs): """ Returns a HttpResponse whose content is filled with the result of calling lookup.get_template(args[0]).render with the passed arguments. """ + dictionary = dictionary or {} return HttpResponse(render_to_string(template_name, dictionary, context_instance, namespace), **kwargs)