Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a comment to the 404/500 views so that people with DEBUG=False …

…and no 404/500 template will get a clue about which template to create.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9368f67b2b5050bac46c420182ee37e1138af347 1 parent 9da791a
@jacobian jacobian authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/views/defaults.py
View
4 django/views/defaults.py
@@ -75,7 +75,7 @@ def page_not_found(request, template_name='404.html'):
request_path
The path of the requested URL (e.g., '/app/pages/bad_page/')
"""
- t = loader.get_template(template_name)
+ t = loader.get_template(template_name) # You need to create a 404.html template.
return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path})))
def server_error(request, template_name='500.html'):
@@ -85,5 +85,5 @@ def server_error(request, template_name='500.html'):
Templates: `500.html`
Context: None
"""
- t = loader.get_template(template_name)
+ t = loader.get_template(template_name) # You need to create a 500.html template.
return http.HttpResponseServerError(t.render(Context({})))
Please sign in to comment.
Something went wrong with that request. Please try again.