在django项目中出现如图所示错误:
很有可能是我们在view模块中根本没有导入django.http 的内置模块
解决方式如下,在我们视图模块导入:
from django.http import HttpResponse
NameError at / name ‘HttpResponse‘ is not defined(Django)
猜你喜欢
转载自blog.csdn.net/qq_45701131/article/details/107394487
今日推荐
周排行