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

前端 未结 15 1989
渐次进展
渐次进展 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:36

    I had the same problem but another solution :

    My project folder was named exactly as one of my application.

    I had :

    /home/myApp
    /home/myApp/settings.py
    /home/myApp/manage.py
    /home/myApp/rights.py
    /home/myApp/static/
    /home/myApp/static/
    /home/myApp/myApp/model.py
    /home/myApp/myApp/admin.py
    /home/myApp/myApp/views.py

    This kind of tree doesn't seems to be possible easily. I changed the name of my project root folder and the problem was solved!

提交回复
热议问题