Ticket #1735: defaults.diff
File defaults.diff, 667 bytes (added by , 19 years ago) |
---|
-
defaults.py
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 """