我正在 django shell API 中导入模型,但出现以下错误。它是如何发生的:
python manage.py shell from .models import Device
我得到:
File "<console>", line 1, in <module> KeyError: "'__name__' not in globals"
python django django-shell
django ×1
django-shell ×1
python ×1