1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[soc2010/app-loading] ignore the classname of custom apps when executing management commands

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Arthur Koziel 2010-08-10 01:16:51 +00:00
parent 9f8478ff31
commit 9cf522e693

View File

@ -156,6 +156,12 @@ def translation(language):
res = _merge(localepath) res = _merge(localepath)
for appname in settings.INSTALLED_APPS: for appname in settings.INSTALLED_APPS:
try:
app = import_module(appname)
except ImportError:
if not '.' in appname:
raise
appname, app_classname = appname.rsplit('.', 1)
app = import_module(appname) app = import_module(appname)
apppath = os.path.join(os.path.dirname(app.__file__), 'locale') apppath = os.path.join(os.path.dirname(app.__file__), 'locale')