diff options
| author | Jannis Leidel | 2012-05-13 12:49:56 +0200 |
|---|---|---|
| committer | Jannis Leidel | 2012-05-13 12:49:56 +0200 |
| commit | f5f41166d4433a017ddff78b8f001e72ff8fd62b (patch) | |
| tree | b07936cd4d5d44c5e8472a808f2392a056cb0033 | |
| parent | 971334eb38561d4721788e7d1b0fb9d7cab3bbf7 (diff) | |
| download | django-debug-toolbar-f5f41166d4433a017ddff78b8f001e72ff8fd62b.tar.bz2 | |
More use of import_module.
| -rw-r--r-- | debug_toolbar/utils/tracking/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/utils/tracking/__init__.py b/debug_toolbar/utils/tracking/__init__.py index 9c72803..6d4b0e3 100644 --- a/debug_toolbar/utils/tracking/__init__.py +++ b/debug_toolbar/utils/tracking/__init__.py @@ -1,6 +1,7 @@ import logging import time import types +from django.utils.importlib import import_module def post_dispatch(func): @@ -47,7 +48,7 @@ def _replace_function(func, wrapped): # oh shit __builtins__[func] = wrapped else: - module = __import__(func.__module__, {}, {}, [func.__module__], 0) + module = import_module(func.__module__) setattr(module, func.__name__, wrapped) elif getattr(func, 'im_self', None): # TODO: classmethods |
