mirror of
https://github.com/django/django.git
synced 2025-06-03 18:49:12 +00:00
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
This commit is contained in:
parent
6ed8497f41
commit
fecc815f3f
@ -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'):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user