On 2/22/06, Claudio Martínez <[EMAIL PROTECTED]> wrote:
> I was wondering if this was safe (thread safe?) to do or if there was a
> better way to do it:

This is done in the default(*vpath,**data) method of a controller. The
default method gets called if no other methods match. An example::

 class Root(RootController):
     @expose()
     def default(self,*vpath,**data):
         return dict(path='/'.join(vpath),**data)


Say you have the above as your controllers.py. You access
``/foobar/baz?bur=2``, which doesn't exist. The default method will be
called and will return ``{path:'foobar/baz',bur:'2'}``.

Using the default method is probably one of those things that should
make its way into the docs.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to