diff options
author | luxagraf <sng@luxagraf.net> | 2013-09-10 18:00:02 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2013-09-10 18:00:02 +0000 |
commit | 1bd92fd5abc212434cf8f41bb90ded3bf3795849 (patch) | |
tree | 13f56b442c1fe88a413e9aaf3a5eb8ff24eb5f5e /config/wsgi.py | |
parent | 4a1ae16f4446807960ec367a2c8afebf6175304e (diff) |
migrated to gunicorn, fixed elements broken in move to digital ocean and rebuilt the link gathering script
Diffstat (limited to 'config/wsgi.py')
-rw-r--r-- | config/wsgi.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/wsgi.py b/config/wsgi.py new file mode 100644 index 0000000..ab5f23a --- /dev/null +++ b/config/wsgi.py @@ -0,0 +1,20 @@ +import os, sys, site +from os.path import dirname, abspath + +# 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/python2.7/site-packages') + +from django.core.handlers.wsgi import WSGIHandler +os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings.settings' +application = WSGIHandler() + +sys.path = [SERVER_ROOT,] + sys.path + +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")) |