Hi!
I am having a problem to configure mod_python for my Django project. I
even created a new project and the problem remains. Below is the
relevant part of my http.conf and the error message I get. From what I
understand mod_python is not finding my dummy.settings. Any help will
be greatly appreciated.
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE dummy.settings
PythonOption django.root /dummy
PythonDebug On
PythonPath "sys.path + ['/home/django','/home/django/dummy']"
</Location>
And here is the error message I am getting:
MOD_PYTHON ERROR
ProcessId: 4122
Interpreter: 'domU-12-31-39-09-F1-A3.compute-1.internal'
ServerName: 'domU-12-31-39-09-F1-A3.compute-1.internal'
DocumentRoot: '/var/www/html'
URI: '/restrictedlink/'
Location: '/'
Directory: None
Filename: '/var/www/html/restrictedlink'
PathInfo: '/'
Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1128, in _execute_target
result = object(arg)
File "/usr/lib/python2.5/site-packages/django/core/handlers/
modpython.py", line 228, in handler
return ModPythonHandler()(req)
File "/usr/lib/python2.5/site-packages/django/core/handlers/
modpython.py", line 191, in __call__
self.load_middleware()
File "/usr/lib/python2.5/site-packages/django/core/handlers/
base.py", line 33, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/usr/lib/python2.5/site-packages/django/utils/functional.py",
line 268, in __getattr__
self._setup()
File "/usr/lib/python2.5/site-packages/django/conf/__init__.py",
line 40, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.5/site-packages/django/conf/__init__.py",
line 75, in __init__
raise ImportError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
e)
ImportError: Could not import settings 'dummy.settings' (Is it on
sys.path? Does it have syntax errors?): No module named dummy
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.