web/ldt/core/handlers/modpython.py
author ymh <ymh.work@gmail.com>
Sat, 12 Jun 2010 04:25:05 +0200
changeset 0 cc4a51750724
child 91 9c83809fda01
permissions -rw-r--r--
first commit
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
def handler(req):
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
    activate_this = req.get_options().get("virtualenv.activate_path")
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
    execfile(activate_this, dict(__file__=activate_this))    
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
    import django.core.handlers.modpython
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
cc4a51750724 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    return django.core.handlers.modpython.handler(req)