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]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

