SEESenv/web/hgbook/run.wsgi
changeset 10 aff1900403ee
parent 9 ab616eb10878
child 11 a7bd4bca6f6e
equal deleted inserted replaced
9:ab616eb10878 10:aff1900403ee
    23 sys.path[:0] = new_sys_path 
    23 sys.path[:0] = new_sys_path 
    24 
    24 
    25 import os
    25 import os
    26 import sys
    26 import sys
    27 import django
    27 import django
       
    28 
       
    29 
    28 print >>sys.stderr , "My Review App running"
    30 print >>sys.stderr , "My Review App running"
       
    31 
    29 home_dir=os.getenv("HOME")
    32 home_dir=os.getenv("HOME")
    30 if home_dir=='/home/amit':
    33 if home_dir=='/home/amit':
    31     sys.path.append('/home/amit/SEES-hacks/SEESenv/web/')
    34     sys.path.append('/home/amit/SEES-hacks/SEESenv/web/')
    32     sys.path.append('/home/amit/SEES-hacks/SEESenv/web/hgbook/comments')
    35     sys.path.append('/home/amit/SEES-hacks/SEESenv/web/hgbook/comments')
    33 else:
    36 else:
    34     sys.path.append('/home/hg/repos/SEES-hacks/SEESenv/web/')
    37     sys.path.append('/home/hg/repos/SEES-hacks/SEESenv/web/')
    35     sys.path.append('/home/hg/repos/SEES-hacks/SEESenv/web/hgbook/comments')
    38     sys.path.append('/home/hg/repos/SEES-hacks/SEESenv/web/hgbook/comments')
    36 os.environ['DJANGO_SETTINGS_MODULE'] = 'hgbook.settings'
    39 os.environ['DJANGO_SETTINGS_MODULE'] = 'hgbook.settings'
    37 import django.core.handlers.wsgi
    40 import django.core.handlers.wsgi
    38 application = django.core.handlers.wsgi.WSGIHandler()
    41 application = django.core.handlers.wsgi.WSGIHandler()
       
    42 print >> sys.stderr , django.core.handlers.wsgi.WSGIRequest.GET
       
    43 _application = django.core.handlers.wsgi.WSGIHandler()
       
    44 #print >> sys.stderr , django.core.handlers.wsgi.WSGIRequest.GET    
       
    45 def application(environ, start_response):
       
    46     print >> sys.stderr ,environ['PATH_INFO']
       
    47     
       
    48     return _application(environ, start_response)
    39 
    49 
    40 
    50 
    41 
    51 
    42