2024-09-28 20:50:24 发布
网友
我创造了一个模特儿 当我打开python控制台并写入from .models import Girl 我得到一个错误:
from .models import Girl
>>> from .models import Girl Traceback (most recent call last): File "<console>", line 1, in <module> KeyError: "'__name__' not in globals"
我该怎么办?在
你试过把应用程序名放在“.models”之前吗?在
>> from [app_name].models import Girl
你试过把应用程序名放在“.models”之前吗?在
相关问题 更多 >
编程相关推荐