Ticket #688: error-handlers.diff
File error-handlers.diff, 821 bytes (added by , 18 years ago) |
---|
-
django/views/defaults.py
76 76 The path of the requested URL (e.g., '/app/pages/bad_page/') 77 77 """ 78 78 t = loader.get_template(template_name) 79 return http.HttpResponseNotFound(t.render( Context({'request_path': request.path})))79 return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path}))) 80 80 81 81 def server_error(request, template_name='500.html'): 82 82 """ … … 86 86 Context: None 87 87 """ 88 88 t = loader.get_template(template_name) 89 return http.HttpResponseServerError(t.render( Context()))89 return http.HttpResponseServerError(t.render(RequestContext(request)))