Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed setup_environ. Seem to have issues whe wsgi imports manage

  • Loading branch information...
commit 8999a104a844ff83efa3e803fa68f98cf62ac5a1 1 parent a6f2a8b
Alfredo Aguirre alfredo authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 manage.py
10 manage.py 100755 → 100644
View
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.