Does webapp2 provide some mechanism to invoke DELETE and PUT actions form html forms

39 views
Skip to first unread message

Marcel Overdijk

unread,
Mar 14, 2013, 5:54:47 PM3/14/13
to web...@googlegroups.com
Given the following routes:

Route(r'/app/product/<id:\d+>', handler='app.handlers.ProductHandler:show', methods=['GET'], name='show-product'),
Route(r'/app/product/<id:\d+>', handler='app.handlers.ProductHandler:delete', methods=['DELETE'], name='delete-product'),

and the following form:

<form action="{{ uri_for('delete-product', id=product.key.id()) }}" method="DELETE">

Submitting this form is picked up by show-product route.

DELETE and PUT actions are not supported by most browsers, but many web frameworks support some magic to support them anyway. E.g. providing a hidden _method param.

Does webapp2 has something to support DELETE and PUT actions out of the box?
Reply all
Reply to author
Forward
0 new messages