diff options
Diffstat (limited to 'config/wsgi.py')
-rw-r--r-- | config/wsgi.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/config/wsgi.py b/config/wsgi.py index ab5f23a..3decdc7 100644 --- a/config/wsgi.py +++ b/config/wsgi.py @@ -6,15 +6,14 @@ sys.stdout = sys.stderr SERVER_ROOT = abspath(dirname(dirname(__file__)))+'/' # Tell wsgi to add the Python site-packages to it's path. -site.addsitedir(SERVER_ROOT+'venv/lib/python2.7/site-packages') +site.addsitedir(SERVER_ROOT+'venv/lib/python3.4/site-packages') -from django.core.handlers.wsgi import WSGIHandler -os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings.settings' -application = WSGIHandler() +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.settings") sys.path = [SERVER_ROOT,] + sys.path +sys.path.insert(0, os.path.join(SERVER_ROOT, "app")) +sys.path.insert(0, os.path.join(SERVER_ROOT, "app/lib")) +sys.path.insert(0, os.path.join(SERVER_ROOT, "config")) -from django.conf import settings -sys.path.insert(0, os.path.join(settings.PROJ_ROOT, "app")) -sys.path.insert(0, os.path.join(settings.PROJ_ROOT, "app/lib")) -sys.path.insert(0, os.path.join(settings.PROJ_ROOT, "config")) +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() |