Home | History | Annotate | Download | only in frontend
      1 import os, sys
      2 
      3 path_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 
     10 for p in path_list:
     11    if os.path.isdir(p):
     12        sys.path.append(p)
     13 
     14 os.environ['DJANGO_SETTINGS_MODULE'] = 'frontend.settings'
     15 
     16 import django.core.handlers.wsgi
     17 
     18 _application = django.core.handlers.wsgi.WSGIHandler()
     19 
     20 def 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