Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Changed django.core.extensions.load_and_render to take context_instan…

…ce instead of context_class keyword arg, so DjangoContext can be used

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0505000533c7a92a970f1dddbc45813d8826e292 1 parent 63994a9
@adrianholovaty adrianholovaty authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 django/core/
8 django/core/
@@ -5,11 +5,13 @@
from django.conf.settings import DEBUG, INTERNAL_IPS
from django.utils.httpwrappers import HttpResponse
-def load_and_render(template_name, dictionary=None, context_class=None):
+def load_and_render(template_name, dictionary=None, context_instance=None):
dictionary = dictionary or {}
- context_class = context_class or Context
t = template_loader.get_template(template_name)
- c = context_class(dictionary)
+ if context_instance:
+ c = context_instance.update(dictionary)
+ else:
+ c = Context(dictionary)
return HttpResponse(t.render(c))
class DjangoContext(Context):
Please sign in to comment.
Something went wrong with that request. Please try again.