使用python的webpy库时。我目前正试图做一个按钮。这是我的HTML文件,Python文件和错误。Webpy,HTML按钮错误
Code.py - 问题区域
onOff = form.Form(
form.Button('On'),
form.Button('Off'),
)
class index:
def GET(self):
f = onoff()
return render.formtest(f)
def POST(self):
form = onOff()
if not form.validates():
return render.formtest(form)
else:
return "Great Success!"
formtest.html - 整页
$def with (f)
$if not form.valid:
Try again, American:
$:form.render()
错误信息,主要错误
at/
GET() takes exactly 1 argument (2 given)
Python /usr/local/lib/python2.7/dist-packages/web/application.py in
handle_class, line 437
Web GET http://192.168.0.34:8080/
高级
+0
欢迎来到Stack Overflow!请将您的代码和错误发布到您的问题中,而不是链接,并且如果可能,请将其编辑为显示问题的最简短的代码。更多的信息在这里:[mcve] –
+1
在那里,我在帖子中修复它,谢谢你让我知道 –