On Jul 14, 3:31 pm, Guyren G Howe <[email protected]> wrote: > On Jul 14, 2010, at 15:14 , Mike Orr wrote: > > > Well, it's clearly a hybrid application because standard TurboGears > > apps do not have custom routes. I looked this up to confirm. > >http://www.turbogears.org/2.0/docs/main/RoutesIntegration.html > > TG uses the catcall "*url" route to send all requests to > > ``RootController.routes_placeholder()``, which then dispatches to the > > appropriate TG action. > > I don't read that as saying that custom routes are non-standard. But anyway. > > What I did was, following the pylons docs here > <http://pylonshq.com/docs/en/0.9.7/controllers/#using-the-rest-control...> > > paster restcontroller incident incidents > > Then inside my incidents controller, I see this comment: > > # To properly map this controller, ensure your config/routing.py > # file has a resource setup: > # map.resource('incident', 'incidents') > > which I dutifully did, and it didn't work. Queue a very long trip down the > rabbit hole trying to work out why, and I still have no good idea. > > So paster, at least, seems to think that a custom route is idiomatic pylons > for a restful controller.
paster is using a template that is installed by Pylons to create the REST controller module for you. In other words, that `restcontroller` paster command is provided by Pylons, and it assumes that you're using a typical Pylons setup. Are the actions in your incidents controller decorated with @expose? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
