django and mod_python
robin at NOTSPAMjessikat.plus.net
Sun Mar 5 11:33:22 CET 2006
bapolis at gmail.com wrote:
> 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
> 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
> 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
in my setup the PythonPath statement puts the folder containing
myproject onto the PythonPath in your case that might be
also I place the SetEnv DJANGO_SETTINGS_MODULE .....
before specifying the PythonHandler, but I am unsure if that is required
(I guess it depends on exactly how apache sets up the location), but
it's what I would do in a batch file for example.
More information about the Python-list