forked from lairdm/islandviewer-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapache.wsgi
32 lines (22 loc) · 982 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
27
28
29
30
31
32
import os, sys, site
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
BASE_PATH = os.path.dirname(PROJECT_PATH)
#print "PROJECT_PATH: "+PROJECT_PATH
#print "BASE_PATH: "+BASE_PATH
os.environ['DJANGO_ENVIRONMENT'] = 'production'
# Add the site-packages of the chosen virtualenv to work with
site.addsitedir(os.path.join(BASE_PATH, 'env/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
print PROJECT_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()
SECURE_SSL_REDIRECT = False