Django KeyError:“''''u name''not in globals'”

2024-09-28 20:50:24 发布

您现在位置:Python中文网/ 问答频道 /正文

我创造了一个模特儿 当我打开python控制台并写入from .models import Girl 我得到一个错误:

>>> from .models import Girl
Traceback (most recent call last):
  File "<console>", line 1, in <module>
KeyError: "'__name__' not in globals"

我该怎么办?在


Tags: infromimportmostmodels错误linecall