author | amit@thunder |
Sat, 13 Feb 2010 13:32:38 +0530 | |
changeset 5 | c9c9819cd5e5 |
parent 3 | 6cee07c589cb |
child 6 | 1ce9b33fb6ff |
permissions | -rw-r--r-- |
3 | 1 |
ALLDIRS = ['/home/amit/SEES-hacks/SEESenv/lib/python2.6/site-packages'] |
2 |
||
3 |
import sys |
|
4 |
import site |
|
5 |
||
6 |
# Remember original sys.path. |
|
7 |
prev_sys_path = list(sys.path) |
|
8 |
||
9 |
# Add each new site-packages directory. |
|
10 |
for directory in ALLDIRS: |
|
11 |
site.addsitedir(directory) |
|
12 |
||
13 |
# Reorder sys.path so new directories at the front. |
|
14 |
new_sys_path = [] |
|
15 |
for item in list(sys.path): |
|
16 |
if item not in prev_sys_path: |
|
17 |
new_sys_path.append(item) |
|
18 |
sys.path.remove(item) |
|
19 |
sys.path[:0] = new_sys_path |
|
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 | 24 |
sys.path.append('/home/amit/SEES-hacks/SEESenv/web/') |
25 |
sys.path.append('/home/amit/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' |
1
672eaaab9204
Added some new html files that failed earlier during change from rst
amit@thunder
parents:
0
diff
changeset
|
27 |
import django.core.handlers.wsgi |
0
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 |