1. Andrew Godwin
  2. south


stringfellow  committed cfb7dc2

Fix import to actually be like django.core.management (use import_module)

  • Participants
  • Parent commits d3c3c70
  • Branches default

Comments (0)

Files changed (1)

File south/management/commands/migrate.py

View file
 from django.core.management.base import BaseCommand
 from django.conf import settings
+from django.utils.importlib import import_module
 from south import migration
 from south.migration import Migrations
         # we need apps to behave correctly.
         for app_name in settings.INSTALLED_APPS:
-                __import__(app_name + '.management', {}, {}, [''])
+                import_module('.management', app_name)
             except ImportError, exc:
                 msg = exc.args[0]
                 if not msg.startswith('No module named') or 'management' not in msg: