try to fix python path
This commit is contained in:
parent
31666c5e9e
commit
1650fe7821
1 changed files with 5 additions and 5 deletions
|
@ -5,15 +5,15 @@ import site
|
|||
|
||||
project_module = 'oxdata'
|
||||
|
||||
# One directory above the project, so project name will be needed for imports
|
||||
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'))
|
||||
|
||||
# with mod_wsgi >= 2.4, this line will add this path in front of the python path
|
||||
site.addsitedir(os.path.join(root_dir, project_module, '..', 'env', 'lib', 'python2.5', 'site-packages'))
|
||||
site.addsitedir(site_package)
|
||||
|
||||
# add this django project
|
||||
sys.path.append(root_dir)
|
||||
sys.path.append(os.path.join(root_dir, project_module))
|
||||
sys.path.insert(0, root_dir)
|
||||
sys.path.insert(0, os.path.join(root_dir, project_module))
|
||||
sys.path.insert(0, site_package)
|
||||
|
||||
#reload if this django.wsgi gets touched
|
||||
import monitor
|
||||
|
|
Loading…
Reference in a new issue