try to fix python path

This commit is contained in:
j 2009-08-20 20:58:56 +02:00
parent 31666c5e9e
commit 1650fe7821

View file

@ -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