小编And*_*ndd的帖子

Django Shell API KeyError

我正在 django shell API 中导入模型,但出现以下错误。它是如何发生的:

python manage.py shell
from .models import Device
Run Code Online (Sandbox Code Playgroud)

我得到:

File "<console>", line 1, in <module> KeyError: "'__name__' not in globals"

python django django-shell

3
推荐指数
1
解决办法
3189
查看次数

标签 统计

django ×1

django-shell ×1

python ×1