While not as pretty as Sinatra's dispatch system. This is a good first step.
Personally I could put up with the explicit self's about the application.
One question though how would this look like if the app gets a bit bigger?

On Thu, Mar 5, 2009 at 10:45 AM, Juan Pablo Scaletti <
[email protected]> wrote:

>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to