diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-09-21 21:41:37 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-09-21 21:41:37 +0000 |
| commit | a6946dac54380483126bb00807ea2974142f6605 (patch) | |
| tree | c5fda65a4f89545d177f59a00c402c372fa75061 | |
| parent | 0505000533c7a92a970f1dddbc45813d8826e292 (diff) | |
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
| -rw-r--r-- | django/core/extensions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/core/extensions.py b/django/core/extensions.py index fce9011fc0..17e1c76734 100644 --- a/django/core/extensions.py +++ b/django/core/extensions.py @@ -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): """ |
