1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

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
This commit is contained in:
Georg Bauer 2005-10-11 13:44:51 +00:00
parent 6f88c4f9ec
commit 9e1640c55f

View File

@ -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')