这是我的代码:
<form method="post" action="/del/" >
<input type="hidden" name="dealkey" value="{{deal.key()}}" />
<input class="btn btn-small" type="submit" value="Delete" />
</form>
class Delete(Handler):
def post(self):
dealid = self.request.get('dealkey')
dealid = int(dealid)
if dealid:
Book.delete(dealid)
self.redirect("/book")
app = webapp2.WSGIApplication([('/', MainPage),
('/book', BookMe),
('/del/',Delete),
],debug=True)
我正在尝试使用 POST 删除 gae 数据存储中的实体,但我得到 405,有人可以解释一下吗?