summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-03-29 08:14:57 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-03-29 08:14:57 +0000
commit7d2568210894d97a419676d311ef18ecc565b8ec (patch)
treeb33fb99755c72cdbab2d0f40d0a6cf9aaafd0348 /django/utils
parentaa538766107c8c74e16cecc3d2e6b29b28b580a0 (diff)
Fixed #13234 -- Rejiggered the imports in the translation utils . Thanks to roklenardic and Spark23 for their reports, and to Alex for his suggestion on a potential fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/django/utils/translation/__init__.py b/django/utils/translation/__init__.py
index 54fb86d499..6d81726a4e 100644
--- a/django/utils/translation/__init__.py
+++ b/django/utils/translation/__init__.py
@@ -1,10 +1,8 @@
"""
Internationalization support.
"""
-from django.conf import settings
from django.utils.encoding import force_unicode
from django.utils.functional import lazy, curry
-from django.utils.translation import trans_real, trans_null
__all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext',
@@ -28,10 +26,11 @@ def delayed_loader(real_name, *args, **kwargs):
that modules can use the translation bits without actually requiring
Django's settings bits to be configured before import.
"""
+ from django.conf import settings
if settings.USE_I18N:
- trans = trans_real
+ from django.utils.translation import trans_real as trans
else:
- trans = trans_null
+ from django.utils.translation import trans_null as trans
# Make the originally requested function call on the way out the door.
return getattr(trans, real_name)(*args, **kwargs)