Ticket #9847: base.diff
File base.diff, 1.0 KB (added by , 16 years ago) |
---|
-
django/core/handlers/base.py
4 4 from django.core import signals 5 5 from django.utils.encoding import force_unicode 6 6 from django.utils.importlib import import_module 7 from django.utils.translation import ugettext_lazy as _ 7 8 8 9 class BaseHandler(object): 9 10 # Changes that are always applied to a response (in this order). … … 123 124 finally: 124 125 receivers = signals.got_request_exception.send(sender=self.__class__, request=request) 125 126 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 ) 127 129 except SystemExit: 128 130 # Allow sys.exit() to actually exit. See tickets #1023 and #4701 129 131 raise