diff options
Diffstat (limited to 'rest_framework/settings.py')
| -rw-r--r-- | rest_framework/settings.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rest_framework/settings.py b/rest_framework/settings.py index 2358d188..13d03e62 100644 --- a/rest_framework/settings.py +++ b/rest_framework/settings.py @@ -119,9 +119,8 @@ def import_from_string(val, setting_name): module_path, class_name = '.'.join(parts[:-1]), parts[-1] module = importlib.import_module(module_path) return getattr(module, class_name) - except: - raise - msg = "Could not import '%s' for API setting '%s'" % (val, setting_name) + except ImportError as e: + msg = "Could not import '%s' for API setting '%s'. %s: %s." % (val, setting_name, e.__class__.__name__, e) raise ImportError(msg) |
