所以我在网络应用程序中尝试了这段代码,它给了我这个错误,def speedup(request):m1 = int(request.POST.get['mi1',False])m3 = int(request.POST.get['mi3',False])m5 = int(request.POST.get['mi5',False])m10= int(request.POST.get['mi10',False])m15= int(request.POST.get['mi15',False])m30= int(request.POST.get['mi30',False])# result calculationreturn render(request,'Speed Result.html',{"days":T})html<form action= "{%url 'sp'%}" method="POST" >
2 回答
狐的传说
TA贡献1804条经验 获得超3个赞
m1 = int(request.POST.get('mi1'))
m3 = int(request.POST.get('mi3'))
m5 = int(request.POST.get('mi5'))
m10= int(request.POST.get('mi10'))
m15= int(request.POST.get('mi15'))
m30= int(request.POST.get('mi30'))
或者
m1 = int(request.POST['mi1'])
m3 = int(request.POST['mi3'])
m5 = int(request.POST['mi5'])
m10= int(request.POST['mi10'])
m15= int(request.POST['mi15'])
m30= int(request.POST[('mi30'])
添加回答
举报
0/150
提交
取消