It seems the CRUDRestController is not derived from
ObjectDispatchController, so the new TG2 'lookup' method does not
apply. As a workaround, I am trying to implement the above by
instantiating controller2 within controller1's get_one() method.
References:
http://turbogears.org/2.0/docs/modules/tgcontroller.html#tg.controllers.DecoratedController
http://turbogears2.sourcearchive.com/documentation/2.0.1/controllers_8py-source.html
Thanks.
I would check out this link on the RestController implementation of
the same style. The key is the __before__ method. CrudRestController
implements this method, so be sure to call it if you override it.
http://turbogears.org/2.0/docs/main/RestControllers.html#nesting-resources-with-restcontrollers
Wes
On Apr 6, 8:21 pm, Wesley Dyk <aus...@gmail.com> wrote:
> On Mon, Apr 5, 2010 at 6:20 PM, ozwyzard <ozwyz...@gmail.com> wrote:
> > When using CRUDRestController, is there a way to implement REST style
> > URLs as follows?
> > http://website.com/controller_1/arg_11/arg_12/controller_2/arg_21/arg_22
>
> > It seems the CRUDRestController is not derived from
> > ObjectDispatchController, so the new TG2 'lookup' method does not
> > apply. As a workaround, I am trying to implement the above by
> > instantiating controller2 within controller1's get_one() method.
>
> > References:
> >http://turbogears.org/2.0/docs/modules/tgcontroller.html#tg.controlle...
> >http://turbogears2.sourcearchive.com/documentation/2.0.1/controllers_...
>
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups "TurboGears" group.
> > To post to this group, send email to turbo...@googlegroups.com.
> > To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/turbogears?hl=en.
>
> I would check out this link on the RestController implementation of
> the same style. The key is the __before__ method. CrudRestController
> implements this method, so be sure to call it if you override it.
>
> http://turbogears.org/2.0/docs/main/RestControllers.html#nesting-reso...
>
> Wes