mirror of https://github.com/django/django.git
Reverted [10346] because it effectively breaks USE_I18N by forcing import of translation before settings are ready.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c4f7bf8312
commit
b2645a15fd
|
@ -4,7 +4,6 @@ from django import http
|
||||||
from django.core import signals
|
from django.core import signals
|
||||||
from django.utils.encoding import force_unicode
|
from django.utils.encoding import force_unicode
|
||||||
from django.utils.importlib import import_module
|
from django.utils.importlib import import_module
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
class BaseHandler(object):
|
class BaseHandler(object):
|
||||||
# Changes that are always applied to a response (in this order).
|
# Changes that are always applied to a response (in this order).
|
||||||
|
@ -124,7 +123,7 @@ class BaseHandler(object):
|
||||||
finally:
|
finally:
|
||||||
receivers = signals.got_request_exception.send(sender=self.__class__, request=request)
|
receivers = signals.got_request_exception.send(sender=self.__class__, request=request)
|
||||||
except exceptions.PermissionDenied:
|
except exceptions.PermissionDenied:
|
||||||
return http.HttpResponseForbidden('<h1>%s</h1>' % _("Permission denied"))
|
return http.HttpResponseForbidden('<h1>Permission denied</h1>')
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
# Allow sys.exit() to actually exit. See tickets #1023 and #4701
|
# Allow sys.exit() to actually exit. See tickets #1023 and #4701
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue