From 20cc69cc3aeb6d7e21ea2a6e438cd0841f83a0a8 Mon Sep 17 00:00:00 2001 From: ramusus Date: Fri, 31 Jan 2014 18:45:38 +0530 Subject: [PATCH] added JOBTASTIC_CACHE_BACKEND_NAME settings --- jobtastic/task.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jobtastic/task.py b/jobtastic/task.py index 379f5e5..811c3f7 100644 --- a/jobtastic/task.py +++ b/jobtastic/task.py @@ -32,7 +32,9 @@ # For now, let's just say that if Django exists, we should use it. # Otherwise, try Flask. This definitely needs an actual configuration # variable so folks can make an explicit decision. - from django.core.cache import cache + from django.core.cache import get_cache + from django.conf import settings + cache = get_cache(getattr(settings, 'JOBTASTIC_CACHE_BACKEND_NAME', 'default')) HAS_DJANGO = True except ImportError: try: