diff options
| author | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
| commit | ae22b6d403dcf25098c77f0dfcf59ae58b186461 (patch) | |
| tree | c37fc631e99a7e4d909d6b6d236f495003731ea7 /django/views/defaults.py | |
| parent | 0cf7bc439129c66df8d64601e885f83b256b4f25 (diff) | |
per-object-permissions: Merged to trunk [5486] NOTE: Not fully tested, will be working on this over the next few weeks.
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@5488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/views/defaults.py')
| -rw-r--r-- | django/views/defaults.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/views/defaults.py b/django/views/defaults.py index 8837dc4834..aea54c963f 100644 --- a/django/views/defaults.py +++ b/django/views/defaults.py @@ -75,8 +75,8 @@ def page_not_found(request, template_name='404.html'): request_path The path of the requested URL (e.g., '/app/pages/bad_page/') """ - t = loader.get_template(template_name) - return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path}))) + t = loader.get_template(template_name) # You need to create a 404.html template. + return http.HttpResponseNotFound(t.iter_render(RequestContext(request, {'request_path': request.path}))) def server_error(request, template_name='500.html'): """ @@ -85,5 +85,5 @@ def server_error(request, template_name='500.html'): Templates: `500.html` Context: None """ - t = loader.get_template(template_name) - return http.HttpResponseServerError(t.render(Context({}))) + t = loader.get_template(template_name) # You need to create a 500.html template. + return http.HttpResponseServerError(t.iter_render(Context({}))) |
