I've got a Django project that actually works fine using the development server that accompany it.

No errors are created whatsoever after i use "django manage.py runserver" and also the application works fine, however when I use it with mod_wsgi and Apache the browser shows "Internal Server Error" having a 500 error code also it creates an import error within the Apache error log.

Here's the mistake within the log:

ImportError: No module named registration

I am while using Django registration module that is situated inside a path such as this:


I understand the registration application is incorporated in the path because I'm able to turn on a Python spend, import sys, and obtain a listing of pathways using sys.path.

Here are the pathways output from Python spend:

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

Any ideas could be appreciated.

Could it be within the pythonpath for that webserver? All individuals '/opt' pathways are usually not within the standard python path, so something is adding individuals for you personally I'd guess. Are you certain additionally, it will get added for that webserver process, or perhaps is PYTHONPATH occur some spend configfile somewhere for the user only?

There's a PythonPath directive when utilizing mod_python, can there be such like for mod_wsgi?

This really is probably a situation from the path not exactly the same for that webserver because it is for you personally, and so i would focus my search in individuals areas.