Django

Code

Changeset 2804

Show
Ignore:
Timestamp:
05/01/06 18:29:59 (3 years ago)
Author:
adrian
Message:

magic-removal: Fixed #1735 -- Default 404 view now gets 'request_path' in template context. Thanks, ubernostrum

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/views/defaults.py

    r2717 r2804  
    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'):