summaryrefslogtreecommitdiff
path: root/config/wsgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'config/wsgi.py')
-rw-r--r--config/wsgi.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/config/wsgi.py b/config/wsgi.py
index 793cfca..8db4170 100644
--- a/config/wsgi.py
+++ b/config/wsgi.py
@@ -1,15 +1,21 @@
+"""
+WSGI config for myproject project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
+"""
+
import os, sys, site
from os.path import dirname, abspath
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
# Fix markdown.py (and potentially others) using stdout
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/python3.4/site-packages')
-
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.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"))
@@ -17,3 +23,4 @@ sys.path.insert(0, os.path.join(SERVER_ROOT, "config"))
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
+