hi,

I'm having trouble getting django to work together with apache an
mod_python



if I try to access the admin page through my browser it displas the
following message


Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line
299, in
HandlerDispatch result = object(req)

  File

"/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/core/handlers/modpython.py",
    line 165, in handler return ModPythonHandler()(req)

  File

"/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/core/handlers/modpython.py",
    line 130, in __call__ from django.conf import settings

  File

"/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/conf/settings.py",
    line 34, in ? raise EnvironmentError, "Could not import %s '%s' (is
it on
    sys.path?): %s %s" % (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE,
    e,sys.path)

EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
    'myproject.settings' (is it on sys.path?):  No module named
    myproject.settings ['/data1/zbdb', '/usr/lib/python23.zip',
    '/usr/lib/python2.3', '/usr/lib/python2.3/plat-linux2',
    '/usr/lib/python2.3/lib-tk', '/usr/lib/python2.3/lib-dynload',
    '/usr/lib/python2.3/site-packages',
    '/usr/lib/python2.3/site-packages/PIL',
    '/usr/lib/python2.3/site-packages/setuptools-0.6a9-py2.3.egg',
    '/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg',
    '/usr/lib/python2.3/site-packages/gtk-2.0']


I added the printing of sys.path to
"/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/conf/settings.py"
to see if the path is correct

myproject.setting can't be imported  but it should be on the sys.path
because /data1/zbdb is in sys.path and
/data1/zbdb/myproject/settings.py
exists

ls  -lst /data1/zbdb/myproject/settings.py
8 -rw-r--r--  1 root root 2601 Mar 22 20:32
/data1/zbdb/myproject/settings.py

this is in my httpd.conf
<Location "/mysite">
    SetHandler python-program
    PythonPath "['/data1/zbdb'] + sys.path"
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE myproject.settings
    PythonDebug On
    PythonAutoReload On
</Location>




Any idea what am I doing wrong? 

thanks, E


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to