Browse files

[soc2010/app-loading] ignore the classname of custom apps when execut…

…ing management commands

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9f8478f commit 9cf522e6932213b75742f7be70153a27492c4424 @arthurk arthurk committed Aug 10, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 django/utils/translation/trans_real.py
View
8 django/utils/translation/trans_real.py
@@ -156,7 +156,13 @@ def _merge(path):
res = _merge(localepath)
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')
if os.path.isdir(apppath):

0 comments on commit 9cf522e

Please sign in to comment.