如何解决django配置settings时遇到Could not import settings 'conf.local'

yipeiwu_com5年前Python基础

举个例子吧

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扫描为模块啊....

相关文章

Python基于dom操作xml数据的方法示例

Python基于dom操作xml数据的方法示例

本文实例讲述了Python基于dom操作xml数据的方法。分享给大家供大家参考,具体如下: 1、xml的内容为del.xml,如下 <?xml version="1.0...

Python zip()函数用法实例分析

本文实例讲述了Python zip()函数用法。分享给大家供大家参考,具体如下: 这里介绍python中zip()函数的使用: >>> help(zip) Help...

Python实现数通设备端口使用情况监控实例

本文实例讲述了Python实现数通设备端口使用情况监控的方法。分享给大家供大家参考。具体如下: 最近因工作需要,上面要求,每天需上报运维的几百数通设备端口使用情况【】,虽然有现成网管监控...

python中列表元素连接方法join用法实例

本文实例讲述了python中列表元素连接方法join用法。分享给大家供大家参考。具体分析如下: 创建列表: >>> music = ["Abba","Rollin...

python 使用matplotlib 实现从文件中读取x,y坐标的可视化方法

python 使用matplotlib 实现从文件中读取x,y坐标的可视化方法

1. test.txt文件,数据以逗号分割,第一个数据为x坐标,第二个为y坐标,数据如下:1.1,2 2.1,2 3.1,3 4.1,5 40,38 42,41 43,42 2....