-
Notifications
You must be signed in to change notification settings - Fork 3
/
apache.wsgi
26 lines (19 loc) · 954 Bytes
/
apache.wsgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os, sys, site
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
BASE_PATH = os.path.dirname(PROJECT_PATH)
os.environ['DJANGO_ENVIRONMENT'] = 'production'
# Add the site-packages of the chosen virtualenv to work with
#site.addsitedir('/data/Modules/islandviewer4/env/local/lib/python2.7/site-packages')
site.addsitedir(os.path.join(BASE_PATH, '/env/local/lib/python2.7/site-packages'))
sys.path.append(PROJECT_PATH)
sys.path.append(os.path.join(PROJECT_PATH, 'Islandviewer'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'Islandviewer.settings'
print BASE_PATH
# Activate your virtual env
activate_path = os.path.join(BASE_PATH, "env/bin/")
activate_env=os.path.join(activate_path, "activate_this" + "." + "py")
execfile(activate_env, dict(__file__=activate_env))
import django.core.handlers.wsgi
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
#application = django.core.handlers.wsgi.WSGIHandler()