|
36
|
1 |
|
|
49
|
2 |
activate_this = '/Users/ymh/dev/workspace/blinkster/sbin/bvenv/bin/activate_this.py' |
|
|
3 |
execfile(activate_this, dict(__file__=activate_this)) |
|
|
4 |
|
|
|
5 |
#ALLDIRS = ['/Users/ymh/dev/workspace/blinkster/sbin/bvenv/lib/python2.5/site-packages'] |
|
|
6 |
|
|
|
7 |
##import sys |
|
|
8 |
#import site |
|
|
9 |
|
|
|
10 |
#prev_sys_path = list(sys.path) |
|
|
11 |
|
|
|
12 |
# Add each new site-packages directory. |
|
|
13 |
#for directory in ALLDIRS: |
|
|
14 |
# site.addsitedir(directory) |
|
36
|
15 |
|
|
49
|
16 |
# Reorder sys.path so new directories at the front. |
|
|
17 |
#new_sys_path = [] |
|
|
18 |
#for item in list(sys.path): |
|
|
19 |
# if item not in prev_sys_path: |
|
|
20 |
# new_sys_path.append(item) |
|
|
21 |
# sys.path.remove(item) |
|
|
22 |
#sys.path[:0] = new_sys_path |
|
|
23 |
|
|
36
|
24 |
|
|
49
|
25 |
#import django.core.handlers.modpython |
|
|
26 |
from django.core.handlers.modpython import handler |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
#def handler(req): |
|
|
32 |
# activate_this = req.get_options().get("virtualenv.activate_path") |
|
|
33 |
# execfile(activate_this, dict(__file__=activate_this)) |
|
|
34 |
# Remember original sys.path. |
|
|
35 |
|
|
|
36 |
# return django.core.handlers.modpython.handler(req) |