On 9/23/06, Ed Singleton <[EMAIL PROTECTED]> wrote: > It's cherrypy.request.path > > I've wanted to do things with it before, because mysite.org/path and > mysite.org/path/ both work but one breaks relative urls.
It seems as if this would be a useful thing to have on the Controller base class. I've run into this situation (assume the root controller is mounted at from "http://example.com"): class SubAppController(Controller): @expose(...) def things(self, ...): return dict(...) @expose(...) def people(self, ...): return dict(...) class MyRoot(RootController): subapp = SubAppController() In this setup, the SubAppController's "things" template can't use turbogears.url() to produce a link to "http://example.com/subapp/people". Calling url('/people') results in "http://example.com/people". Calling url('people') results in "http://example.com/subapp/things/people". If a controller knew where it was mounted, the Controller class could provide a url() method, so that self.url('/people') would return "http://example.com/subapp/people". -- Tim Lesher <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

