Multiple Submits in HTML Forms - Cherrypy

Maurice LING mauriceling at acm.org
Tue Mar 18 03:14:32 EDT 2008


Hi,

Assuming that I have this code for Cherrypy 3

class Welcome:
     def index(self):
         return """
		<form action="btn_handler" method="POST">
		<input value="Add" name="AddBtn" type="submit">
		<input value="Edit" name="EditBtn" type="submit">
		</form>"""
     index.exposed = True

How should I write "btn_handler" so that it will perform different 
actions when different button is pressed?

Thanks in advance

Cheers
maurice



More information about the Python-list mailing list