Works using Django development server, but throws import error with Apache using mod_wsgi

Posted by Raj on Stack Overflow See other posts from Stack Overflow or by Raj
Published on 2010-01-30T23:15:08Z Indexed on 2010/06/16 3:02 UTC
Read the original article Hit count: 410

Filed under:
|
|
|

I have a Django project that works fine with the development server that comes with it.

No errors are produced at all when I use "django manage.py runserver" and the app works fine, but when I try to use it with mod_wsgi and Apache the browser displays "Internal Server Error" with a 500 error code and it generates an import error in the Apache error log.

Here's the error in the log:

ImportError: No module named registration

I'm using the Django registration module which is located in a path like this:

/opt/raj/photos/registration

I know that the registration app is in the path because I can fire up a Python shell, import sys, and get a list of paths using sys.path.

Here are some of the paths output from Python shell:

sys.path ['', '/opt/raj/pyamf', '/opt/raj', '/opt/raj/pictures', '/opt/raj/pictures /registration', '/usr/lib/python2.6',....]

Any thoughts would be appreciated.

© Stack Overflow or respective owner

Related posts about django

Related posts about apache