diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-18 16:55:59 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-18 16:55:59 +0000 |
| commit | c485e236bd7e5ea40c64b2fe54d85dbb15b2fd39 (patch) | |
| tree | fc5e86abf39b69181b2084f5c39038f1811b6b44 /django/core/files/storage.py | |
| parent | ee2f04d79e5bca55637b9bb3301618738a4e342a (diff) | |
Fixed #8193: all dynamic imports in Django are now done correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/files/storage.py')
| -rw-r--r-- | django/core/files/storage.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/files/storage.py b/django/core/files/storage.py index a1b843d5a1..bf30a787bb 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -8,6 +8,7 @@ from django.core.files import locks, File from django.core.files.move import file_move_safe from django.utils.encoding import force_unicode from django.utils.functional import LazyObject +from django.utils.importlib import import_module from django.utils.text import get_valid_filename from django.utils._os import safe_join @@ -230,7 +231,7 @@ def get_storage_class(import_path=None): raise ImproperlyConfigured("%s isn't a storage module." % import_path) module, classname = import_path[:dot], import_path[dot+1:] try: - mod = __import__(module, {}, {}, ['']) + mod = import_module(module) except ImportError, e: raise ImproperlyConfigured('Error importing storage module %s: "%s"' % (module, e)) try: |
