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

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

    At first look I'd say the python path is wrong but compared to interactive shell it looks ok. So maybe try this:

    from django.core.management import setup_environ
    from mofin import settings
    
    setup_environ(settings)
    

提交回复
热议问题