summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-02-26 17:43:41 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-02-26 17:43:41 +0000
commit9368f67b2b5050bac46c420182ee37e1138af347 (patch)
tree0711ba1da21262aa1012ca3e25dfa9364a4066b0
parent9da791aa6b31d0eee1c24e53aa5daa9150189004 (diff)
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
-rw-r--r--django/views/defaults.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/views/defaults.py b/django/views/defaults.py
index 8837dc4834..701aebabd6 100644
--- a/django/views/defaults.py
+++ b/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({})))