diff --git a/wsgi/django.wsgi b/wsgi/django.wsgi index 1179b38..1b7a8ad 100644 --- a/wsgi/django.wsgi +++ b/wsgi/django.wsgi @@ -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