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 177, in handler
return ModPythonHandler()(req)
File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 145, in __call__
self.load_middleware()
File "/usr/lib/python2.4/site-packages/django/core/handlers/
base.py", line 22, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
line 28, in __getattr__
self._import_settings()
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
line 55, in _import_settings
self._target = Settings(settings_module)
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py",
line 83, in __init__
raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
e)
EnvironmentError: Could not import settings 'myproject.settings' (Is
it on sys.path? Does it have syntax errors?): No module named
myproject.settings
My http.conf is This
.
.
.
.
<Location "/myproject/">
SetHandler python-program
PythonPath "['/home/user'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
SetHandler python-program
PythonDebug On
</Location>
.
.
.
.
I searched on google a lot but unable to find a suitable clue
Other Information My System is linux
Required installation complete.(According to resources available on
the django project site)
I was running successfully on django itself but migration to apache
cause such bug.
help me
I will be thankfull to to you
A
Where is myproject.settings located?
On Mar 1, 11:37 pm, "Jeremy Dunck" <jdu...@gmail.com> wrote:
OK. Then just make sure that the apache process has read and execute
permissions on the directory (and subdirs), and read permission on all
the files.
On Mar 2, 12:01 am, "Jeremy Dunck" <jdu...@gmail.com> wrote:
On Mar 2, 12:01 am, "Jeremy Dunck" <jdu...@gmail.com> wrote:
So your home directory has the execute bit set for the "other" section
as well (when you run "ls -ld /home/user", the last character of the
permissions should be 'x', the same as for the myproject directory.
Also, does /home/user/myproject/ contain an __init__.py file? I guess it
does since you seem to be saying you got it to work somewhere else, but
let's just check.
Regards,
Malcolm