1
0
mirror of https://github.com/django/django.git synced 2024-12-26 11:06:07 +00:00

Fixed #533 -- Fixed bug when using custom context_instance in load_and_render(). Thanks, Brantley

git-svn-id: http://code.djangoproject.com/svn/django/trunk@657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-09-21 21:41:37 +00:00
parent 0505000533
commit a6946dac54

View File

@ -9,10 +9,10 @@ def load_and_render(template_name, dictionary=None, context_instance=None):
dictionary = dictionary or {}
t = template_loader.get_template(template_name)
if context_instance:
c = context_instance.update(dictionary)
context_instance.update(dictionary)
else:
c = Context(dictionary)
return HttpResponse(t.render(c))
context_instance = Context(dictionary)
return HttpResponse(t.render(context_instance))
class DjangoContext(Context):
"""