diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-17 07:11:37 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-17 07:11:37 +0000 |
| commit | bccb8897e6ab0fe8d2e5b9bcb725ac28b1c8e566 (patch) | |
| tree | d3abbbdf27fa5ae3c78a9dc510798cd521e46684 /django/views/defaults.py | |
| parent | 44dd91ec6d39525e52b78f7fff6de8531b980f5f (diff) | |
Fixed #4565 -- Changed template rendering to use iterators, rather than
creating large strings, as much as possible. This is all backwards compatible.
Thanks, Brian Harring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/views/defaults.py')
| -rw-r--r-- | django/views/defaults.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/views/defaults.py b/django/views/defaults.py index 701aebabd6..aea54c963f 100644 --- a/django/views/defaults.py +++ b/django/views/defaults.py @@ -76,7 +76,7 @@ def page_not_found(request, template_name='404.html'): The path of the requested URL (e.g., '/app/pages/bad_page/') """ t = loader.get_template(template_name) # You need to create a 404.html template. - return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path}))) + return http.HttpResponseNotFound(t.iter_render(RequestContext(request, {'request_path': request.path}))) def server_error(request, template_name='500.html'): """ @@ -86,4 +86,4 @@ def server_error(request, template_name='500.html'): Context: None """ t = loader.get_template(template_name) # You need to create a 500.html template. - return http.HttpResponseServerError(t.render(Context({}))) + return http.HttpResponseServerError(t.iter_render(Context({}))) |
