Added virtualenv support to wsgi.py
- Legacy-Id: 9467
This commit is contained in:
parent
bcfa6f4490
commit
9c5de53b54
|
@ -42,6 +42,12 @@ import os
|
|||
import sys
|
||||
|
||||
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Virtualenv support
|
||||
virtualenv_activation = os.path.join(path, "bin", "activate_this.py")
|
||||
if os.path.exists(virtualenv_activation):
|
||||
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
|
||||
|
||||
if not path in sys.path:
|
||||
sys.path.insert(0, path)
|
||||
|
||||
|
|
Loading…
Reference in a new issue