On Feb 7, 11:37 pm, Tony Winslow <[EMAIL PROTECTED]> wrote:
> Kenneth Gonsalves wrote:
> > On 06-Feb-08, at 7:41 PM, Tony Winslow wrote:
>
> >> I installed mod_python and do the configurations as the tutorial on
> >> the
> >> official site. But mod_python still can not find the mysite.settings
> >> module. What might be the problem?
>
> > paste the relevant part of your apache config
>
> <Location "/mysite/">
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> PythonDebug On
> PythonPath "sys.path + ['/path/to/mysite', '/var/www']"
> </Location>
>
> I've tried many ways:
> put settings.py with the other source codes,
> set DJANGO_SETTINGS_MODULE to be settings or mysite.settings
Is 'mysite' the actual name you used, or have you changed the name in
the post to hide what it really is?
First off, as per documented instructions for mod_python, you need to
have the parent directory of the Django site directory as well as the
directory.
PythonPath "sys.path + ['/path/to', '/path/to/mysite', '/var/www']"
Secondly, if 'mysite' isn't the name of your site, adding the
directories after sys.path can be a problem if the real name you are
using clashes with the name of a standard Python module.
Finally, Apache runs as a special user, so make sure that that user
has search access to directories and is also able to read files in the
directories.
So, maybe post the proper configuration with the real paths, and also
provide as 'ls -las' directory listing of parent directory of site,
plus the site directory itself.
Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---