Source

"""Routes configurationThe more specific and detailed routes should be defined first so theymay take precedent over the more generic routes. For more informationrefer to the routes manual at http://routes.groovie.org/docs/"""frompylonsimportconfigfromroutesimportMapperdefmake_map():"""Create, configure and return the routes Mapper"""map=Mapper(directory=config['pylons.paths']['controllers'],always_scan=config['debug'])map.minimization=False# The ErrorController route (handles 404/500 error pages); it should# likely stay at the top, ensuring it can always be resolvedmap.connect('error/:action/:id',controller='error')# CUSTOM ROUTES HEREmap.connect('/',controller='comment',action='index')map.connect('/:controller/index',action='index')map.connect('/:controller/:action/')map.connect('/:controller/:action/:id')returnmap