Author: arthurk
Date: 2010-08-09 20:16:51 -0500 (Mon, 09 Aug 2010)
New Revision: 13569
Modified:
django/branches/soc2010/app-loading/django/utils/translation/trans_real.py
Log:
[soc2010/app-loading] ignore the classname of custom apps when executing
management commands
Modified:
django/branches/soc2010/app-loading/django/utils/translation/trans_real.py
===================================================================
--- django/branches/soc2010/app-loading/django/utils/translation/trans_real.py
2010-08-10 01:01:14 UTC (rev 13568)
+++ django/branches/soc2010/app-loading/django/utils/translation/trans_real.py
2010-08-10 01:16:51 UTC (rev 13569)
@@ -156,7 +156,13 @@
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):
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.