I think mod_python is looking for settings in the MKSearch module, which does not exist in the / home / user / django / MyDjangoApp directory. Try adding the parent directory to the PythonPath directive, as shown below:
<Location "/MyDjangoApp/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE MKSearch.settings PythonOption django.root /MyDjangoApp PythonPath "['/home/user/django/', '/home/user/django/MyDjangoApp,'/var/www'] + sys.path" PythonDebug On </Location>
Or remove the module name from env var DJANGO_SETTINGS_MODULE, as shown below:
<Location "/MyDjangoApp/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonOption django.root /MyDjangoApp PythonPath "['/home/user/django/MyDjangoApp,'/var/www'] + sys.path" PythonDebug On </Location>
sleepyjames
source share