Permalink
Browse files
Make env vars less intrusive in WSGI
- Loading branch information...
Showing
with
3 additions
and
2 deletions.
-
+3
−2
wsgi/playdoh.wsgi
|
|
@@ -1,7 +1,9 @@ |
|
|
import os
|
|
|
import site
|
|
|
|
|
|
-os.environ['CELERY_LOADER'] = 'django'
|
|
|
+os.environ.setdefault('CELERY_LOADER', 'django')
|
|
|
+# NOTE: you can also set DJANGO_SETTINGS_MODULE in your environment to override
|
|
|
+# the default value in manage.py
|
|
|
|
|
|
# Add the app dir to the python path so we can import manage.
|
|
|
wsgidir = os.path.dirname(__file__)
|
|
@@ -11,7 +13,6 @@ site.addsitedir(os.path.abspath(os.path.join(wsgidir, '../'))) |
|
|
import manage
|
|
|
|
|
|
import django.core.handlers.wsgi
|
|
|
-os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
|
|
application = django.core.handlers.wsgi.WSGIHandler()
|
|
|
|
|
|
# vim: ft=python
|
0 comments on commit
b92ec1f