blob: ef885262a28dcb0659db667f5f84c12ad1dc8b71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import os
from os.path import dirname, abspath
import sys
# This file is inside online_test/apache/django.wsgi
# pth should be online_test
pth = abspath(dirname(dirname(__file__)))
if pth not in sys.path:
sys.path.append(pth)
# Now add the parent of online_test also.
pth = dirname(pth)
if pth not in sys.path:
sys.path.append(pth)
os.environ['DJANGO_SETTINGS_MODULE'] = 'online_test.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
|