mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
magic-removal: Changed 404 and 500 templates to add .html extension. Refs #1643
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fe0d508a6a
commit
231a6edb7d
@ -65,22 +65,22 @@ def shortcut(request, content_type_id, object_id):
|
||||
else:
|
||||
return http.HttpResponseRedirect(absurl)
|
||||
|
||||
def page_not_found(request, template_name='404'):
|
||||
def page_not_found(request, template_name='404.html'):
|
||||
"""
|
||||
Default 404 handler, which looks for the requested URL in the redirects
|
||||
table, redirects if found, and displays 404 page if not redirected.
|
||||
|
||||
Templates: `404`
|
||||
Templates: `404.html`
|
||||
Context: None
|
||||
"""
|
||||
t = loader.get_template(template_name)
|
||||
return http.HttpResponseNotFound(t.render(Context()))
|
||||
|
||||
def server_error(request, template_name='500'):
|
||||
def server_error(request, template_name='500.html'):
|
||||
"""
|
||||
500 error handler.
|
||||
|
||||
Templates: `500`
|
||||
Templates: `500.html`
|
||||
Context: None
|
||||
"""
|
||||
t = loader.get_template(template_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user