Thanks, Moritz León Domingo
Ender - Factoría de Software [email protected] <[email protected]> Avda. Cerro del Águila, 7. S23 - 2ª Planta 28703 S.S. de los Reyes (MADRID) Tlf. 902 01 44 01 <http://www.ender.es/> <http://www.facebook.com/home.php?#%21/pages/San-Sebastian-de-los-Reyes-Spain/Ender-Factoria-de-Software/142213119143359?ref=ts> * <http://www.ender.es>* On 14 April 2012 10:56, Moritz Schlarb <[email protected]> wrote: > Hello Leon, > > if I do: > > class FooController(BaseController): > > @expose() > def default(self, *args, **kwargs): > return str(args) + str(kwargs) > > and go to > http://localhost:8080/foo/123 > I get > ('123',){} > > So I can't see that it wouldn't work here. > > But depending in your use case, you propably would have more fun with the > _lookup method of returning another Controller. > It is documented here: > http://turbogears.org/2.1/docs/main/TGControllers.html?highlight=_lookup#the-lookup-method > > Regards, > Moritz > > Am Samstag, 14. April 2012 09:19:18 UTC+2 schrieb León Domingo: >> >> Hi, >> How do I have to build an "index" controller of this type. I would like >> to "control" these two requests in one single controller: >> >> http://mydomain.com/foo >> http://mydomain.com/foo/123 >> >> I'm using this now but it's not working anymore with TG 2.1.5 and TG >> 2.2beta, so I would like to fix it. I've never been confident about this >> implementation. I think it's probably wrong. >> >> class FooController(BaseController): >> @expose(....) >> def default(self, *args): >> return dict() >> >> Thanks in advance >> > > Am Samstag, 14. April 2012 09:19:18 UTC+2 schrieb León Domingo: >> >> Hi, >> How do I have to build an "index" controller of this type. I would like >> to "control" these two requests in one single controller: >> >> http://mydomain.com/foo >> http://mydomain.com/foo/123 >> >> I'm using this now but it's not working anymore with TG 2.1.5 and TG >> 2.2beta, so I would like to fix it. I've never been confident about this >> implementation. I think it's probably wrong. >> >> class FooController(BaseController): >> @expose(....) >> def default(self, *args): >> return dict() >> >> Thanks in advance >> > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/turbogears/-/D8T8Q9fivUQJ. > 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?hl=en. > -- 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?hl=en.

