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

前端 未结 15 1932
渐次进展
渐次进展 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条回答
  • 2020-12-04 11:55

    I had a similar permissions problem, and although my settings.py had the right permissions, the .pyc's did not!!! So watch out for this.

    0 讨论(0)
  • 2020-12-04 11:55

    Hey, just adding an additional answer to this problem. I had the exact same issue, but it wasn't file permissions. I was appending "path/to/project", but not also appending "path/to". Linked is mod_wsgi's Django integration explanation that showed me the answer.

    0 讨论(0)
  • 2020-12-04 11:59

    I found the answer... file permissions. /home/django was set to 700. i.e. only django can view the contents. apache runs as Apache and so can't get past /home/django.

    0 讨论(0)
提交回复
热议问题