Мой проект находится в каталоге: / home / projects / testing, и я добавляю его к нижней части моего файла /etc/httpd/conf/httpd.conf на компьютере Centos, но это не работает,
<Location "/testing/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE testing.settings
PythonOption django.root /testing
PythonDebug On
PythonPath "['/home/projects/'] + sys.path"
</Location>
но при запросе http://localhost/testing/jobs, например, я получаю:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)
.............
File "/usr/lib/python2.4/site-packages/Django-1.1.1-py2.4.egg/django/conf/__init__.py", line 75, in __init__
raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'testing.settings' (Is it on sys.path? Does it have syntax errors?): No module named testing.settings