diff options
author | Dan McGee <dan@archlinux.org> | 2010-10-07 19:45:09 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-10-07 19:45:09 -0500 |
commit | 2016a9d6f74b2cf871d7c1e74b219f21d160cd6a (patch) | |
tree | b44ce2946f3c487538268b96e680a04db34a52dc /main/utils.py | |
parent | b2acd5cb94d0a675272048c1a3628152648911c1 (diff) |
Move import to top level
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/utils.py')
-rw-r--r-- | main/utils.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/utils.py b/main/utils.py index 81093e2a..eadd8550 100644 --- a/main/utils.py +++ b/main/utils.py @@ -2,6 +2,7 @@ try: import cPickle as pickle except ImportError: import pickle +from django.core.cache import cache from django.utils.hashcompat import md5_constructor def cache_function(length): @@ -18,8 +19,6 @@ def cache_function(length): """ def decorator(func): def inner_func(*args, **kwargs): - from django.core.cache import cache - raw = [func.__name__, func.__module__, args, kwargs] pickled = pickle.dumps(raw, protocol=pickle.HIGHEST_PROTOCOL) key = md5_constructor(pickled).hexdigest() |