Browse Source

Dont install django fixup if djcelery loader active

Ask Solem 11 years ago
parent
commit
670be78e54
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/fixups/django.py

+ 1 - 1
celery/fixups/django.py

@@ -30,7 +30,7 @@ def _maybe_close_fd(fh):
 
 def fixup(app, env='DJANGO_SETTINGS_MODULE'):
     SETTINGS_MODULE = os.environ.get(env)
-    if SETTINGS_MODULE:
+    if SETTINGS_MODULE and 'django' not in app.loader_cls.lower():
         try:
             import django  # noqa
         except ImportError: