mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +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:
parent
9f8478ff31
commit
9cf522e693
@ -156,7 +156,13 @@ def translation(language):
|
|||||||
res = _merge(localepath)
|
res = _merge(localepath)
|
||||||
|
|
||||||
for appname in settings.INSTALLED_APPS:
|
for appname in settings.INSTALLED_APPS:
|
||||||
app = import_module(appname)
|
try:
|
||||||
|
app = import_module(appname)
|
||||||
|
except ImportError:
|
||||||
|
if not '.' in appname:
|
||||||
|
raise
|
||||||
|
appname, app_classname = appname.rsplit('.', 1)
|
||||||
|
app = import_module(appname)
|
||||||
apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
|
apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
|
||||||
|
|
||||||
if os.path.isdir(apppath):
|
if os.path.isdir(apppath):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user