oxdata/wsgi/django.wsgi
2009-08-20 20:58:56 +02:00

29 lines
781 B
Python

# django.wsgi
import os
import sys
import site
project_module = 'oxdata'
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
site_package = os.path.normpath(os.path.join(root_dir, project_module, '..', 'env', 'lib', 'python2.5', 'site-packages'))
site.addsitedir(site_package)
# add this django project
sys.path.insert(0, root_dir)
sys.path.insert(0, os.path.join(root_dir, project_module))
sys.path.insert(0, site_package)
#reload if this django.wsgi gets touched
import monitor
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()