Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit fecc815f3f67a25439cc1b5662e3254224cd1309 1 parent 6ed8497
Adrian Holovaty authored May 01, 2006

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  django/views/defaults.py
6  django/views/defaults.py
@@ -71,10 +71,12 @@ def page_not_found(request, template_name='404.html'):
71 71
     table, redirects if found, and displays 404 page if not redirected.
72 72
 
73 73
     Templates: `404.html`
74  
-    Context: None
  74
+    Context:
  75
+        request_path
  76
+            The path of the requested URL (e.g., '/app/pages/bad_page/')
75 77
     """
76 78
     t = loader.get_template(template_name)
77  
-    return http.HttpResponseNotFound(t.render(Context()))
  79
+    return http.HttpResponseNotFound(t.render(Context({'request_path': request.path})))
78 80
 
79 81
 def server_error(request, template_name='500.html'):
80 82
     """

0 notes on commit fecc815

Please sign in to comment.
Something went wrong with that request. Please try again.