Python bottle form response handling

Flowers

New Member
I'm using bottle as a web server in my application. I have a scenario in which an html at the client side has a form which its action is : "/updateDb"\[code\] <!DOCTYPE html><html><head></head><body><script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script><script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js'></script><form action="/updateData" method="post" id="inputFrm"><input type="button" id="submitBtn" value="http://stackoverflow.com/questions/13786751/submit"/><input name ="studentId" type="text"/></form><script>$(document).ready(function() { $("#submitBtn").click(function() { document.forms["inputFrm"].submit(); }); });</script></body></html>\[/code\]In the server side I'm inserting the student id to the database and then wish to update the response object according to the current status. for example, if the insertion to the db failed, i'd like to return a response object with some descriptive text and status and decide on the client side how to act.So my question is :where in the python code can I deal with bottle's response object which represents the from's response? Thanks
 
Back
Top