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