• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import os, sys
2
3path_list = ['/usr/local/autotest/site-packages',
4             '/usr/local/autotest',
5             '/usr/lib/python2.7/site-packages/autotest',
6             '/usr/lib/python2.6/site-packages/autotest',
7             '/usr/lib/python2.5/site-packages/autotest',
8             '/usr/lib/python2.4/site-packages/autotest']
9
10for p in path_list:
11   if os.path.isdir(p):
12       sys.path.append(p)
13
14os.environ['DJANGO_SETTINGS_MODULE'] = 'frontend.settings'
15
16import django.core.handlers.wsgi
17
18_application = django.core.handlers.wsgi.WSGIHandler()
19
20def application(environ, start_response):
21    environ['DJANGO_USE_POST_REWRITE'] = 'yes'
22    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
23    return _application(environ, start_response)
24