oxdata/wsgi/django.wsgi

29 lines
748 B
Plaintext
Raw Normal View History

2009-07-17 15:17:50 +00:00
# django.wsgi
import os
import sys
import site
project_module = 'oxdata'
2009-10-09 15:20:54 +00:00
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
2009-07-17 15:17:50 +00:00
#using virtualenv's activate_this.py to reorder sys.path
2010-08-11 12:59:04 +00:00
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
2009-08-20 19:09:35 +00:00
sys.path.append(root_dir)
sys.path.append(os.path.join(root_dir, project_module))
2009-07-17 15:17:50 +00:00
#reload if this django.wsgi gets touched
2010-08-11 13:06:56 +00:00
from oxdjango import monitor
2009-07-17 15:17:50 +00:00
monitor.start(interval=1.0)
monitor.track(os.path.abspath(os.path.dirname(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = project_module + '.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()