metanohi/nohi.wsgi

17 lines
339 B
Plaintext
Raw Normal View History

2011-07-05 21:20:55 +02:00
"""WSGI interface"""
import sys
2011-07-14 22:28:37 +02:00
import os.path
2011-07-05 21:20:55 +02:00
_absfile = os.path.abspath(__file__)
_filedir = os.path.dirname(_absfile)
2011-07-14 22:28:37 +02:00
sys.path.insert(0, _filedir)
2011-07-05 21:20:55 +02:00
try:
2011-07-14 22:28:37 +02:00
import mege.wsgi
2011-07-05 21:20:55 +02:00
except ImportError:
sys.path.insert(0, os.path.join(_filedir, 'mege'))
2011-07-14 22:28:37 +02:00
import mege.wsgi
2011-07-05 21:20:55 +02:00
os.chdir(_filedir)
2011-07-14 22:28:37 +02:00
application = mege.wsgi.create_application()