Commits

David Chambers committed d4b15bb

Replaced `dict_` with a more descriptively named variable.

Comments (0)

Files changed (1)

                 return k
     return value
 
-def html_response(template_name, request, dict_=None, status_code=None):
-    if dict_ is None:
-        dict_ = {}
+def html_response(template_name, request, context=None, status_code=None):
+    if context is None:
+        context = {}
 
     # provide access to the request (without relying upon a context processor)
-    dict_['request'] = request
+    context['request'] = request
 
     # make Mango's settings accessible to templates
     for key, value in mango.settings.__dict__.items():
         if not key.startswith('_'):
-            dict_[key] = value
+            context[key] = value
 
     # Django settings
-    dict_['settings'] = settings
+    context['settings'] = settings
 
     # set top-level category
     index = mango.main.Index.get()
 
-    dict_['archives'] = index.archives()
-    dict_['posts'] = index.descendants()
-    dict_['tags'] = index.tags()
+    context['archives'] = index.archives()
+    context['posts'] = index.descendants()
+    context['tags'] = index.tags()
 
-    dict_['stylesheets'] = stylesheets()
-    dict_['scripts'] = scripts()
+    context['stylesheets'] = stylesheets()
+    context['scripts'] = scripts()
 
     response = HttpResponse(loader.render_to_string(template_name,
-            context_instance=RequestContext(request, dict_)))
+            context_instance=RequestContext(request, context)))
     if status_code:
         response.status_code = status_code
     return response