add wsgi foobar
This commit is contained in:
parent
c267b258be
commit
34e5a4a039
5 changed files with 155 additions and 11 deletions
29
wsgi/django.wsgi
Normal file
29
wsgi/django.wsgi
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# django.wsgi
|
||||
import os
|
||||
import sys
|
||||
import site
|
||||
|
||||
project_module = 'oxdata'
|
||||
|
||||
# One directory above the project, so project name will be needed for imports
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
|
||||
# with mod_wsgi >= 2.4, this line will add this path in front of the python path
|
||||
site.addsitedir(os.path.join(root_dir, project_module, 'env', 'lib', 'python2.5', 'site-packages'))
|
||||
|
||||
# add this django project
|
||||
sys.path.append(root_dir)
|
||||
sys.path.append(os.path.join(root_dir, project_module))
|
||||
|
||||
#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()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue