Deleting rows from database with python flask?

前端 未结 4 927
一整个雨季
一整个雨季 2021-01-01 05:58

I am using a flask framework, and can\'t seem to delete rows from the database. The code below gives a 405 error: \"The method is not allowed for the requested URL.\" Any id

4条回答
  •  醉酒成梦
    2021-01-01 06:27

    Alternatively, change POST to DELETE to get you going.

    @app.route('/delete/', methods=['DELETE'])
    

    Ideally, you should use HTTP DELETE method.

提交回复
热议问题