try to fix python path again
This commit is contained in:
parent
1650fe7821
commit
dfe3562d3e
1 changed files with 10 additions and 4 deletions
|
@ -9,11 +9,17 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_
|
||||||
site_package = os.path.normpath(os.path.join(root_dir, project_module, '..', 'env', 'lib', 'python2.5', 'site-packages'))
|
site_package = os.path.normpath(os.path.join(root_dir, project_module, '..', 'env', 'lib', 'python2.5', 'site-packages'))
|
||||||
|
|
||||||
site.addsitedir(site_package)
|
site.addsitedir(site_package)
|
||||||
|
|
||||||
# add this django project
|
# add this django project
|
||||||
sys.path.insert(0, root_dir)
|
sys.path.append(root_dir)
|
||||||
sys.path.insert(0, os.path.join(root_dir, project_module))
|
sys.path.append(os.path.join(root_dir, project_module))
|
||||||
sys.path.insert(0, site_package)
|
sys.path.append(site_package)
|
||||||
|
|
||||||
|
#remove local folders
|
||||||
|
sys.path = filter(lambda x: "local" not in x, sys.path)
|
||||||
|
|
||||||
|
|
||||||
|
site.addsitedir(site_package)
|
||||||
|
|
||||||
#reload if this django.wsgi gets touched
|
#reload if this django.wsgi gets touched
|
||||||
import monitor
|
import monitor
|
||||||
|
|
Loading…
Add table
Reference in a new issue