How do I stop getting ImportError: Could not import settings 'mofin.settings' when using django with wsgi?

前端 未结 15 1992
渐次进展
渐次进展 2020-12-04 11:15

I can\'t get wsgi to import my settings file for my project \'mofin\'.

The list of errors from the apache error log are as follows

mod_wsgi (pid=4001         


        
15条回答
  •  猫巷女王i
    2020-12-04 11:41

    (I wrote up this same answer for Django deployment problem in Apache/mod_wsgi. ImportError: Could not import settings 'site.settings' in case someone only finds this question.)

    This doesn't appear to be the problem in your case, but I ran smack into the same ImportError when I used the WSGIPythonPath directive (instead of the .wsgi file) to set up sys.path. That worked fine until I switched to running WSGI in daemon mode. Once you do that, you have to use the python-path argument to the WSGIDaemonProcess directive instead.

提交回复
热议问题