blob: ab5f23a32fe5b3bb00ceb2ee6f4ae653e2640c19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"))
|