Ticket #1735: defaults.diff

File defaults.diff, 667 bytes (added by James Bennett, 13 years ago)

Patch to add 'request_path' variable to 404 context

  • defaults.py

     
    7171    table, redirects if found, and displays 404 page if not redirected.
    7272
    7373    Templates: `404.html`
    74     Context: None
     74    Context:
     75        request_path
     76            The path of the requested URL (e.g., '/app/pages/bad_page/')
    7577    """
    7678    t = loader.get_template(template_name)
    77     return http.HttpResponseNotFound(t.render(Context()))
     79    return http.HttpResponseNotFound(t.render(Context({'request_path': request.path})))
    7880
    7981def server_error(request, template_name='500.html'):
    8082    """
Back to Top