舉個例子吧
Django最佳實踐與部署:Nginx + Gunicorn + Supervisor(Ubuntu和CentOS)
http://sfdye.com/articles/django-best-practice-and-deployment-with-nginx-gunicorn-and-supervisor/
結果出現runserver --settings=...的時候出現報錯Could not import settings 'conf.local' (Is it on sys.path? Is there an import error in the settings file?): N
o module named conf.local
怎么調整也找不到,很是奇怪
最后發現 原來又是這個萬惡的
init.py
一定要在自建的文件夾里面建立這個空文件才會被django掃描為模塊啊....
新聞熱點
疑難解答