Please try to be patient...a lot of the TG people have been at PyCon and probably aren't checking their mail much at the moment...
I've never really tried to change the routing setup in TG2, but it looks like the AppConfig method is the way to go, according to the docs: http://turbogears.org/2.1/docs/main/RoutesIntegration.html?highlight=routes Also, check the controller that you are routing to for "/homepage/test/this". If it's an ObjectDispatchController that may be causing your problems. See the above docs page for details. Kevin Horn On Tue, Feb 23, 2010 at 6:03 PM, Yo'av Moshe <[email protected]> wrote: > Sorry but... Anyone? > > I'm thinking *someone* must be using routes in TG2 and can shade some > light... :-( > > Yo'av > > On Feb 20, 12:38 am, "Yo'av Moshe" <[email protected]> wrote: > > Does it work? > > > > I'm finally trying to convert my website from (TG1.0)TG1.1 to TG2.1... > > One of the features I'm liking the most is the use of Routes... But I > > can't get it to work. > > > > I've tried 2 different methods: > > 1 - Put this in my root.py, above my RootController: > > > > def setup_routes(self): > > map = Mapper(directory=config['pylons.paths']['controllers'], > > always_scan=config['debug']) > > map.connect('/homepage/test/this', controller='RootController', > > action="index") > > map.connect('*url', controller='root', > > action='routes_placeholder') > > config['routes.map'] = map > > > > Still, /home/test/this returns 404 (though /index is working fine). > > > > 2 - Adding setup_routes to my AppConfig object in app_cfg.py: > > > > def setup_routes(self): > > map = Mapper(directory=config['pylons.paths']['controllers'], > > always_scan=config['debug']) > > map.connect(None, '/homepage/test/this', > > controller='root', > > action='index') > > map.connect('*url', > > controller='root', > > action='routes_placeholder') > > config['routes.map'] = map > > > > Still, only /index works and no /homepage/test/this > > > > I've tried setting controller as 'root' as well as 'RootController' > > and 'index'. None of which helped. > > > > What am I missing? When I installed TG2.1 I thought I'd have a > > routes.py file right from the quickstart that I can mess with... :( > > > > I tried searching the group's archive, the above ideas was all I got.. > > > > How can mess with my URLs? :p > > > > Thank you! > > Yo'av > > -- > 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]<turbogears%[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.

