[mod_python] mod_python and Django

Jorey Bump list at joreybump.com
Wed Jul 27 12:42:32 EDT 2005


Dagur Pall Ammendrup wrote:

> I did do that and I can import it just fine in the console. This is the 
> error I get:
> 
> EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 
> 'myproject.settings.main' (is it on sys.path?): No module named 
> myproject.settings.main

Try these:

1. Configure mod_python in a <Directory> container, not a <Location> 
container.

2. Import sys in a mod_python test module and display sys.path. Check 
that it contains the path.

3. Be sure to use only one PythonPath directive per interpreter. 
Multiple PythonPath directives tend to clobber each other.


More information about the Mod_python mailing list