How about something like this:
""" code.py """
import web
from expose import get, post
web.app = web.application()
@get('/')
def hello(name='world'):
return "Hello, " + name
@post('/')
def changeName():
i = web.input(name='world')
return "You posted your name! Hello, " + i.name
if __name__ == '__main__':
web.app.run()
where "expose.py" is: http://paste2.org/p/158528
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---