the same question
2006/1/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Actually, I had messed up my DocumentRoot and /etc/host file which was
pointiong to my PHP projects path. The Welcome screen was from symfony
framework, which I had installed previously.
Now, after I fixed it, I'm getting this error:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
result = object(req)
File
"/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py",
line 165, in handler
return ModPythonHandler()(req)
File
"/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py",
line 130, in __call__
from django.conf import settings
File "/usr/lib/python2.4/site-packages/django/conf/settings.py", line
34, in ?
raise EnvironmentError, "Could not import %s '%s' (is it on
sys.path?): %s" % (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e)
EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
'GoodCompany.settings' (is it on sys.path?): No module named
GoodCompany.settings
I guess there must be something wrong with my PythonPath setting.
If my project is located in /work/django/GoodCompany and
'GoodCompany.settings' is loaded when I run internal server, what
should I put in VirtualHost configuration? My current VirtualHost
config looks like this:
<VirtualHost goodcompany:80>
ServerName goodcompany
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath sys.path+['/work/django/GoodCompany']
SetEnv DJANGO_SETTINGS_MODULE GoodCompany.settings
PythonDebug On
DocumentRoot "/work/django/GoodCompany"
<Directory "/work/django/GoodCompany">
allow from all
Options All
</Directory>
<Location "/media/">
SetHandler None
</Location>
</VirtualHost>
--
www.mawei.name
Petit
IM&mail:[EMAIL PROTECTED]
13585201588