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
This commit is contained in:
parent
9da791aa6b
commit
9368f67b2b
|
@ -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({})))
|
||||
|
|
Loading…
Reference in New Issue