存在问题:
工程文件models.py文件中创建了个cal的类,想在views.py文件中通过from models import cal引用,发现失效,引用失败
解决方案:
正确的应需在models前加个点“.”
from .models import cal
存在问题:
工程文件models.py文件中创建了个cal的类,想在views.py文件中通过from models import cal引用,发现失效,引用失败
解决方案:
正确的应需在models前加个点“.”
from .models import cal

被折叠的 条评论
为什么被折叠?