Permalink
Browse files

Removed setup_environ. Seem to have issues whe wsgi imports manage

  • Loading branch information...
1 parent a6f2a8b commit 8999a104a844ff83efa3e803fa68f98cf62ac5a1 @alfredo alfredo committed Mar 20, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 manage.py
View
10 manage.py 100755 → 100644
@@ -30,23 +30,25 @@
sys.path.remove(item)
sys.path[:0] = new_sys_path
-from django.core.management import execute_manager
-import imp
+from django.core.management import execute_manager, setup_environ
try:
- imp.find_module('settings_local')
import settings_local as settings
except ImportError:
try:
- imp.find_module('settings')
import settings
except ImportError:
+ import sys
sys.stderr.write(
"Error: Tried importing 'settings_local.py' and 'settings.py' "
"but neither could be found (or they're throwing an ImportError)."
" Please come back and try again later.")
raise
+# If we want to use django settings anywhere, we need to set up the required
+# environment variables.
+setup_environ(settings)
+
# Configure Celery
import djcelery
djcelery.setup_loader()

0 comments on commit 8999a10

Please sign in to comment.