python - ImportError - Django and mod_wsgi -


I am trying to set up mod_wsgi with Django and Apache locally on Fedora 16 machine. I run in error:

  importError: Settings 'cat.settings' (this is on sys.path?) Can not be imported: there is no module named cat.settings   

I know there are other questions about this - but their solution has not fixed this error.

-

There is some insight into my set-up:

  • Receiving 500 Internal Server Errors on Localhost.
  • My directory is: / home / name / src / django / animals / cat (where the cat has a __init__.py and settings.py file in the directory.
  • I have a cat directory There is an application folder named catOne - it also has a __init__.py file.
  • My wsgi file looks like this:
    • settings and permissions init files 755, but I've also tried 777 without success. < / Li>

    • My sys.path looks like this:

        / var / www /usr/lib/python27.zip/ usr /lib/python2.7 /usr/lib/python2.7/plat-linux2/usr/lib/python2.7 / Lib-tk /usr/lib/python2.7/lib-old/usr/lib/python2.7 /lib-dynload/usr/lib/python2.7/site-packages/usr/lib/python2.7/site-package/pil/url/ipb/python2.7/site-packages / gst-0.10 / usr / lib /python2.7/site-packages/gtk-2.0/usr/lib/python2.7/site-pack Ages / setuptools -0.6c11-py2.7.egg-info / home / name / src / django / animals / cat / home / name / src / django / animals   

      to help you Thank you!

      SELinux was causing a problem to access the file. This is probably not the best way, but I've completely disabled it by editing the / etc / selinux / config file. SELINUX = SELINUX = Change disabled.

      Then, there are better grain controls to replace SELinux, so disable it at your own risk.

Comments