blob: 1518628b812f24260fbe23e9b1cedd0bb9cb6651 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import os
import sys
import site
path_to_venv = "/home/vlabs-sbhs/code/venv/"
path_to_project_root = "/home/vlabs-sbhs/code/sbhs/"
# Add the site-packages of the chosen virtualenv to work with
site.addsitedir(path_to_venv + 'local/lib/python2.7/site-packages/')
# Add the app's directory to the PYTHONPATHr
sys.path.append(path_to_project_root)
sys.path.append(path_to_project_root + 'sbhs_server/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'sbhs_server.settings'
# Activate your virtual env
activate_env=os.path.expanduser(path_to_venv + "bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
|