Author: adrian Date: 2006-04-15 15:14:51 -0500 (Sat, 15 Apr 2006) New Revision: 2703
Modified: django/branches/magic-removal/django/views/defaults.py Log: magic-removal: Changed 404 and 500 templates to add .html extension. Refs #1643 Modified: django/branches/magic-removal/django/views/defaults.py =================================================================== --- django/branches/magic-removal/django/views/defaults.py 2006-04-15 20:13:44 UTC (rev 2702) +++ django/branches/magic-removal/django/views/defaults.py 2006-04-15 20:14:51 UTC (rev 2703) @@ -26,7 +26,7 @@ object_domain = None - # Otherwise, we need to introspect the object's relationships for a + # Otherwise, we need to introspect the object's relationships for a # relation to the Site object opts = obj._meta @@ -57,30 +57,30 @@ object_domain = Site.objects.get_current().domain except Site.DoesNotExist: pass - + # If all that malarky found an object domain, use it; otherwise fall back # to whatever get_absolute_url() returned. if object_domain is not None: return http.HttpResponseRedirect('http://%s%s' % (object_domain, absurl)) 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) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates -~----------~----~----~----~------~----~------~--~---