From 9e1640c55f8957b1827f70cc28c6ee20bbcfb8b8 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Tue, 11 Oct 2005 13:44:51 +0000 Subject: [PATCH] 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 --- django/utils/translation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')