Cart Quantity Update using flask

I want to implement quantity update option on cart by using + and – button to increase or decrease the quantity and I dont know how to implement this, I passed the quantity input as hidden to retrieve in flask, and I have tried by writing Update query to update the database in flask but still I cant identify how to implement this help me complete this process

I have tried by retrieving data in flask and passed the update query to update the database it not gives any error but also I have debugged that to identify the data retrieve or not in that the output give quantity: None now I want to implement the quantity update option in cart using flask