I have been running Apache and PHP successfully for a while and would now like to use python as well. I have installed django and mod_wsgi, but still haven’t got them working.
I get errors like
ImportError: Could not import settings '/srv/django_projects/proj1/settings.py' (Is it on sys.path?):
in my apache logs. Tutorials about setting PYTHONPATH seem to require adding an export command to webserver startup scripts, but frankly I have no idea what I’m doing so I’d like to get some clarity about what’s going on, and what I should do.
Use a virtual environment as documented in:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
Also see:
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonPath
and the python-path option of:
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
Which of the latter you might use depends on how you are running mod_wsgi.
So, lots of documentation available.