Ticket #9847: base.diff

File base.diff, 1.0 KB (added by kgrandis, 16 years ago)
  • django/core/handlers/base.py

     
    44from django.core import signals
    55from django.utils.encoding import force_unicode
    66from django.utils.importlib import import_module
     7from django.utils.translation import ugettext_lazy as _
    78
    89class BaseHandler(object):
    910    # Changes that are always applied to a response (in this order).
     
    123124                    finally:
    124125                        receivers = signals.got_request_exception.send(sender=self.__class__, request=request)
    125126        except exceptions.PermissionDenied:
    126             return http.HttpResponseForbidden('<h1>Permission denied</h1>')
     127            exception_string = _("Permission denied")
     128            return http.HttpResponseForbidden('<h1>%s</h1>' % exception_string )
    127129        except SystemExit:
    128130            # Allow sys.exit() to actually exit. See tickets #1023 and #4701
    129131            raise
Back to Top