Django

Code

Changeset 2703

Show
Ignore:
Timestamp:
04/15/06 15:14:51 (3 years ago)
Author:
adrian
Message:

magic-removal: Changed 404 and 500 templates to add .html extension. Refs #1643

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/views/defaults.py

    r2615 r2703  
    2727    object_domain = None 
    2828 
    29     # Otherwise, we need to introspect the object's relationships for a  
     29    # Otherwise, we need to introspect the object's relationships for a 
    3030    # relation to the Site object 
    3131    opts = obj._meta 
     
    5858        except Site.DoesNotExist: 
    5959            pass 
    60              
     60 
    6161    # If all that malarky found an object domain, use it; otherwise fall back 
    6262    # to whatever get_absolute_url() returned. 
     
    6565    else: 
    6666        return http.HttpResponseRedirect(absurl) 
    67      
    68 def page_not_found(request, template_name='404'): 
     67 
     68def page_not_found(request, template_name='404.html'): 
    6969    """ 
    7070    Default 404 handler, which looks for the requested URL in the redirects 
    7171    table, redirects if found, and displays 404 page if not redirected. 
    7272 
    73     Templates: `404
     73    Templates: `404.html
    7474    Context: None 
    7575    """ 
     
    7777    return http.HttpResponseNotFound(t.render(Context())) 
    7878 
    79 def server_error(request, template_name='500'): 
     79def server_error(request, template_name='500.html'): 
    8080    """ 
    8181    500 error handler. 
    8282 
    83     Templates: `500
     83    Templates: `500.html
    8484    Context: None 
    8585    """