diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-01 23:29:59 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-01 23:29:59 +0000 |
| commit | fecc815f3f67a25439cc1b5662e3254224cd1309 (patch) | |
| tree | 586cc6a183b738925b22dd26a229fb723d9b9aeb | |
| parent | 6ed8497f41f2919d4a62efe9b01c9dc034634090 (diff) | |
magic-removal: Fixed #1735 -- Default 404 view now gets 'request_path' in template context. Thanks, ubernostrum
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/views/defaults.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/views/defaults.py b/django/views/defaults.py index 71df6f41c2..d5460a7495 100644 --- a/django/views/defaults.py +++ b/django/views/defaults.py @@ -71,10 +71,12 @@ def page_not_found(request, template_name='404.html'): table, redirects if found, and displays 404 page if not redirected. Templates: `404.html` - Context: None + Context: + 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(Context())) + return http.HttpResponseNotFound(t.render(Context({'request_path': request.path}))) def server_error(request, template_name='500.html'): """ |
