Commits

Anonymous committed 6b4b4c0

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

Comments (0)

Files changed (1)

django/utils/translation/trans_real.py

                 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):