Your handler looks fine, are you sure you are sending the request correctly? Using jQuery, this works for me (both using dev_appserver and using the Google engine):
$('#delete-button').click(function() { $.ajax({ 'type': 'DELETE', 'url': '/some/url/that/handles/delete' }) }); class DeleteHandler(webapp.RequestHandler): def delete(self): if users.get_current_user() == allowed_user: the_data_model.delete() else: self.response.out.write('Permission denied')
Sending the body of the response / message did not work for me (for example, the message "access denied" in my example will not be delivered to the client). Have you confirmed that your products are not deleted?
pthulin
source share