[英]How to solve the traceback error, when it is not a code issue?
So I downloaded this project ( https://github.com/alectrocute/flasksaas ) on my machine. 所以我在我的机器上下载了这个项目( https://github.com/alectrocute/flasksaas )。 Interesting is, that on my other computer everything works great, but not on this one.
有趣的是,在我的另一台计算机上,一切都很好,但不是在这一台上。 I am stuck at the point, where I want to initialize the database with following command:
我陷入困境,我想用以下命令初始化数据库:
$python manage.py initdb
I reinstalled python, the modules etc., but it doesn't help. 我重新安装了python,模块等,但它没有帮助。 I checked my system environment variables in the settings (OS: Windows), everything seems fine.
我在设置(操作系统:Windows)中检查了我的系统环境变量,一切似乎都很好。
Error which occurs: 发生错误:
Traceback (most recent call last):
File "manage.py", line 4, in <module>
__init__.py, line 6, in <module>
app.config.from_object('app.config')
NameError: name 'config_dev' is not defined
Expected result: "SQL database has been created." 预期结果:“已创建SQL数据库”。
After looking at the repo's Makefile , you'll find what each make
target means: 在查看repo的Makefile之后 ,您将找到每个
make
目标的含义:
install
: run$ pip install -r requirements.txt
install
:运行$ pip install -r requirements.txt
dev
: copy (or link) theconfig_dev.py
toconfig.py
dev
:将config_dev.py
复制(或链接)到config.py
prod
: copy (or link) theconfig_prod.py
toconfig.py
prod
:将config_prod.py
复制(或链接)到config.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.