Modifying a page and not creating a new one
Denis LE FUR <[email protected]>
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
Hello, I am a new user... Here is an example. The result appears in a new page. How to put it in the index page ? Thank you. ---------------------------------------- import cherrypy import os class monSite: #---------------index @cherrypy.expose def index(self) : output=""" <br> <form action="somme" method="GET"> <input type=number name="a" /> + <input type=number name="b" /> <input type="submit" value="=" /> </form> <br> <br> """ return output #-------------- somme @cherrypy.expose def somme(self,a=0,b=0): r=int(a)+int(b) output=str(r) return output cherrypy.quickstart(monSite()) ---------------------------------------- -- You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.