如何解決django配置settings時遇到Couldnotimportsettings'conf.local
來源:懂視網
責編:小采
時間:2020-11-27 14:40:46
如何解決django配置settings時遇到Couldnotimportsettings'conf.local
如何解決django配置settings時遇到Couldnotimportsettings'conf.local:舉個例子吧 Django最佳實踐與部署:Nginx + Gunicorn + Supervisor(Ubuntu和CentOS) http://sfdye.com/articles/django-best-practice-and-deployment-with-nginx-gunicorn-and-supervisor/ 結果出現runse
導讀如何解決django配置settings時遇到Couldnotimportsettings'conf.local:舉個例子吧 Django最佳實踐與部署:Nginx + Gunicorn + Supervisor(Ubuntu和CentOS) http://sfdye.com/articles/django-best-practice-and-deployment-with-nginx-gunicorn-and-supervisor/ 結果出現runse

舉個例子吧
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掃描為模塊啊....
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
如何解決django配置settings時遇到Couldnotimportsettings'conf.local
如何解決django配置settings時遇到Couldnotimportsettings'conf.local:舉個例子吧 Django最佳實踐與部署:Nginx + Gunicorn + Supervisor(Ubuntu和CentOS) http://sfdye.com/articles/django-best-practice-and-deployment-with-nginx-gunicorn-and-supervisor/ 結果出現runse