我使用了此代码,但无法使用代码块打开记事本 是否有特定的代码块设置可以运行此程序?
def update(request,id):
print(id)
data = CrudOperation.objects.get(id=id)
if request.method == 'POST': # check first if the request is post
form = CrudForm(request.POST,instance=data)
if form.is_valid():
form.save()
return HttpResponse('<h1>update method</h1>')
else:
form = CrudForm(instance=data)
return render(request,'edit.html',{'data':data,'form':form})
答案 0 :(得分:0)
以上提供的代码已在Windows 10上成功运行,因为代码块的最新版本主要是针对Windows 10设计的,它确实在Windows 10上打开了记事本,谢谢。