On Jun 30, 12:12 pm, Rama Vadakattu <rama.vadaka...@gmail.com> wrote:
> As the error is with import please try to do this
>
> Just open a python shell and try do the import
More to the point, do it with the exact version that mod_python was
compiled against and run the test as the same user that Apache runs
as.
This is because mod_python may be using a different Python
installation if there is more than one installed and because Apache
runs as a different user. There is no point therefore doing this as
yourself as that doesn't reflect how it will run.
You also need to ensure PYTHONPATH is not set in environment of shell
you run test as, as that wouldn't normally be set for Apache/
mod_python.
> >>> import django.core.handlers.modpython
>
> if it works fine then we are sure that modpython is present on the
> python path and the problem is not with import ......................
Ahh, no. The mod_python package is different. This is showing that
Django itself is present for that version of Python. The ImportError
specifically indicates that it can't even import top level 'django'
module.
Graham
> On Jun 30, 3:31 am, garagefan <monkeygar...@gmail.com> wrote:
>
>
>
> >http://kennethdavid.net/admin
>
> > error page:
>
> > MOD_PYTHON ERROR
>
> > ProcessId: 9659
> > Interpreter: 'kennethdavid.net'
>
> > ServerName: 'kennethdavid.net'
> > DocumentRoot: '/home/kdwadmin'
>
> > URI: '/admin'
> > Location: '/'
> > Directory: None
> > Filename: '/home/kdwadmin/admin'
> > 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
> > 1202, in _process_target
> > module = import_module(module_name, path=path)
>
> > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
> > 304, in import_module
> > return __import__(module_name, {}, {}, ['*'])
>
> > ImportError: No module named django.core.handlers.modpython
>
> > I know i know, this has been asked a million times... i've looked at
> > the answers and i've checked things...
>
> > both mod_python and django live in my site packages directory. I've
> > set apache as the group and gave it RWX privileges. i've also insured
> > that the path from site packages to the modpython.py does in fact go
> > through django/core/handlers/modpython
>
> > at this point, i'm not sure what else to check.
>
> > my virtual host setup looks like this:
>
> > NameVirtualHost kennethdavid.net:80
>
> > <VirtualHost kennethdavid.net:80>
> > ServerName kennethdavid.net
> > ServerAliaswww.kennethdavid.net
> > DocumentRoot /home/kdwadmin
>
> > <Location />
> > SetHandler python-program
> > PythonHandler django.core.handlers.modpython
> > SetEnv DJANGO_SETTINGS_MODULE kdnet.settings
> > PythonPath "['/home/kdwadmin', '/home/kdwadmin/kdnet']
> > + sys.path"
> > PythonDebug On
> > </Location>
> > </VirtualHost>
>
> > obviously it works because its getting to mod_python and getting sick.
>
> > thanks guys and gals
--~--~---------~--~----~------------~-------~--~----~
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
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---