SEESenv/web/hgbook/run.wsgi
author amit@thunder
Sat, 13 Feb 2010 12:29:22 +0530
changeset 3 6cee07c589cb
parent 2 52d12eb31c30
child 6 1ce9b33fb6ff
permissions -rwxr-xr-x
Changes in path of some of the files ...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     1
ALLDIRS = ['/home/hg/repos/SEES-hacks/SEESenv/lib/python2.6/site-packages']
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     2
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     3
import sys 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     4
import site 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     5
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     6
# Remember original sys.path.
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     7
prev_sys_path = list(sys.path) 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     8
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
     9
# Add each new site-packages directory.
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    10
for directory in ALLDIRS:
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    11
  site.addsitedir(directory)
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    12
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    13
# Reorder sys.path so new directories at the front.
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    14
new_sys_path = [] 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    15
for item in list(sys.path): 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    16
    if item not in prev_sys_path: 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    17
        new_sys_path.append(item) 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    18
        sys.path.remove(item) 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    19
sys.path[:0] = new_sys_path 
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    20
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    21
import os
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    22
import sys
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    23
import django
3
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    24
sys.path.append('/home/hg/repos/SEES-hacks/SEESenv/web/')
6cee07c589cb Changes in path of some of the files ...
amit@thunder
parents: 2
diff changeset
    25
sys.path.append('/home/hg/repos/SEES-hacks/SEESenv/web/hgbook/comments')
0
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    26
os.environ['DJANGO_SETTINGS_MODULE'] = 'hgbook.settings'
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    27
import django.core.handlers.wsgi
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    28
application = django.core.handlers.wsgi.WSGIHandler()
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    29
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    30
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    31
8083d21c0020 The first commit of all the required files for the review app
amit@thunder
parents:
diff changeset
    32