django and mod_python

bapolis at gmail.com bapolis at gmail.com
Sun Mar 5 09:55:27 CET 2006


Hi,

I read the mod_python documentation on the Django site but I'm getting
this error:

EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
'accesshiphop.settings' (is it on sys.path?): No module named
accesshiphop.settings

Here's my httpd.conf:

<Location "/public_html/myproject/">
    PythonPath "[r'c:/apache/public_html/myproject/']+sys.path"
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE myproject.settings
    PythonDebug On
</Location>

Also, the Django site says "Also, if you've manually altered your
PYTHONPATH to put your Django project on it, you'll need to tell
mod_python:"

I don't recall adding my project to my PYTHONPATH. Should I have done
this? How do I do this?

Thanks.




More information about the Python-list mailing list