Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
858 B
28 lines
858 B
"""
|
|
WSGI config for mamweb project.
|
|
|
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
|
|
"""
|
|
|
|
import sys, os, os.path, traceback, time, signal
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mamweb.settings")
|
|
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'lib', 'python2.7', 'site-packages')))
|
|
|
|
|
|
try:
|
|
from django.core.wsgi import get_wsgi_application
|
|
application = get_wsgi_application()
|
|
|
|
except Exception:
|
|
print('handling WSGI exception')
|
|
# Error loading applications
|
|
if 'mod_wsgi' in sys.modules:
|
|
traceback.print_exc()
|
|
os.kill(os.getpid(), signal.SIGINT)
|
|
time.sleep(2)
|
|
|
|
|