python setting at httpd.conf:
<Directory "C:/depot/projects/web/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
AddHandler python-program .py
PythonHandler mod_python.publisher
PythonPath "['C:/Python25/Lib/site-packages/mod_python/',]+sys.path"
PythonDebug On
</Directory>
django setting at vhosts.conf:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/depot/projects/web/"
ServerName web
ServerAlias *.web
ErrorLog "logs/dummy-host2.li-error_log"
CustomLog "logs/dummy-host2.li-access_log" common
<Location "/web">
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonOption django.root "C:/depot/projects/web/"
SetEnv DJANGO_SETTINGS_MODULE web.settings
PythonPath "['C:/depot/projects/web/'] + sys.path"
PythonDebug On
</Location>
<Location "/media">
SetHandler None
</Location>
<LocationMatch "\.(jpg|gif|png|css|js)$">
SetHandler None
</LocationMatch>
</VirtualHost>
and i always got an error :
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined
Any help will be much appreciated!