pycharm,创建 Django 项目,代码运行结果正常,却不能在浏览器上 http://127.0.0.1:8000/正常显示页面

2018-09-02 13:53:06 +08:00
 shonky

https://i.loli.net/2018/09/02/5b8b7a6a91629.png https://i.loli.net/2018/09/02/5b8b7a6a95bb7.png

是什么地方参数设置的不对呢, 谢谢了。还是刚刚学习,按网上的设置了,并不能成功解决

6200 次点击
所在节点    Django
25 条回复
shonky
2018-09-03 19:00:37 +08:00
@Leigg

django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Process finished with exit code 1
shonky
2018-09-03 19:00:53 +08:00
Leigg
2018-09-03 19:05:39 +08:00
https://www.cnblogs.com/lout/articles/4149591.html
一般这种入门时候的错误都有大把人遇到过
shonky
2018-09-03 19:50:15 +08:00
@Leigg ModuleNotFoundError: No module named 'settings'
我按上面填的。加上路径也没用
shonky
2018-09-03 21:32:45 +08:00
@Leigg 已谷歌解决,谢谢了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/485358

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX