summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-10-11 13:44:51 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-10-11 13:44:51 +0000
commit9e1640c55f8957b1827f70cc28c6ee20bbcfb8b8 (patch)
tree08bfbe28cfa63f68202d036ab9d8c700e8b16a34 /django/utils
parent6f88c4f9ecf3837d4f1bb8dcd0c437bc2bdca09d (diff)
i18n: fixed projectpath discovery. Now the DJANGO_SETTINGS_MODULE environment variable is used to find the project base
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py
index 1abeccf39b..73f073f68b 100644
--- a/django/utils/translation.py
+++ b/django/utils/translation.py
@@ -119,7 +119,7 @@ def translation(appname, language):
except IOError: t = gettext_module.NullTranslations()
_translations[(appname, language)] = t
- parts = appname.split('.')
+ parts = os.environ['DJANGO_SETTINGS_MODULE'].split('.')
project = __import__(parts[0], {}, {}, [])
projectpath = os.path.join(os.path.dirname(project.__file__), 'locale')