diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-01 21:46:42 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-01 21:46:42 +0000 |
| commit | c4f7bf8312a520ecd4bfcfb3f4868e5de9ab11ae (patch) | |
| tree | 7eeb2852f09e746795e76d9e41cfdb8a616eae71 | |
| parent | c860758a574432a2eaef72d609535d40455cbfa2 (diff) | |
Fixed #9847: mark the permission denied message for translation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/handlers/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index e6ef6e2f9e..5cd78a19f7 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -4,6 +4,7 @@ from django import http from django.core import signals from django.utils.encoding import force_unicode from django.utils.importlib import import_module +from django.utils.translation import ugettext_lazy as _ class BaseHandler(object): # Changes that are always applied to a response (in this order). @@ -123,7 +124,7 @@ class BaseHandler(object): finally: receivers = signals.got_request_exception.send(sender=self.__class__, request=request) except exceptions.PermissionDenied: - return http.HttpResponseForbidden('<h1>Permission denied</h1>') + return http.HttpResponseForbidden('<h1>%s</h1>' % _("Permission denied")) except SystemExit: # Allow sys.exit() to actually exit. See tickets #1023 and #4701 raise |
