From 8efe88a9e4cea5f97ccf71e62234ab75ef9fd3ee Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 2 Aug 2012 13:49:55 +0200 Subject: Make Celery and Kombu optional (but the import is not available) --- chimere/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chimere/tasks.py') diff --git a/chimere/tasks.py b/chimere/tasks.py index 58af162..c69302f 100644 --- a/chimere/tasks.py +++ b/chimere/tasks.py @@ -17,6 +17,11 @@ # See the file COPYING for details. +from django.conf import settings +if 'kombu.transport.django' not in settings.INSTALLED_APPS \ + or 'djcelery' in settings.INSTALLED_APPS: + raise ImportError + from celery.decorators import task from django.core.exceptions import ObjectDoesNotExist -- cgit v1.2.3