Ticket #688: error-handlers.diff

File error-handlers.diff, 821 bytes (added by James Wheare <django@…>, 18 years ago)

Allows error handlers to benefit from context processors

  • django/views/defaults.py

     
    7676            The path of the requested URL (e.g., '/app/pages/bad_page/')
    7777    """
    7878    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})))
    8080
    8181def server_error(request, template_name='500.html'):
    8282    """
     
    8686    Context: None
    8787    """
    8888    t = loader.get_template(template_name)
    89     return http.HttpResponseServerError(t.render(Context()))
     89    return http.HttpResponseServerError(t.render(RequestContext(request)))
Back to Top