I've just tried to setup and upload my Django project to Dreamhost.
I've followed the answer here : Update new Django and Python 2.7.* with virtualenv on Dreamhost (with passenger)
Everything seemed to have worked fine up to the passenger_wsgi which gives me the error "An error occurred importing your passenger_wsgi.py" I've not had any experience with setting this kind of thing up before.
My current wsgi file
import sys, os
cwd = os.getcwd()
sys.path.append(cwd)
sys.path.append(cwd + '/projectname')
if sys.version < "2.7.5": os.excel("/home/<usr>/<domain.com>/env/bin/python",
"python2.7.5", *sys.argv)
sys.path.insert(0, '/home/<usr>/<domain.com>/evn/bin')
sys.path.insert(0, '/home/<usr>/<domain.com>/evn/lib/python2.7/site-packages/django')
sys.path.insert(0, '/home/<usr>/<domain.com>/evn/lib/python2.7/site-packages')
os.environ['DJANGO_SETTINGS_MODULE'] = "projectname.settings"
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
where
<usr>
is the Shell user, and
<domain.com>
is the folder for my domain-
I don't really know how to go about finding the source of the problem here, as I don't even know how I can debug this. I have tried changing some of the file directories in case I had something wrong but have had no luck.
I wonder if it could be something to do with Django being installed onto the Python virtualenv?