pyalchemybiz/pyalchemybiz/config/routing.py
Jan Dittberner ab91d92af3 maintenance work
* remove generated template python code (fixes #6)
 * add an index controller and make it the default (addresses #5)
 * add a dependency to sqlalchemy-migrate (fixes #4, addresses #2)


git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@6 389c73d4-bf09-4d3d-a15e-f94a37d0667a
2008-10-05 19:02:55 +00:00

25 lines
868 B
Python

"""Routes configuration
The more specific and detailed routes should be defined first so they
may take precedent over the more generic routes. For more information
refer to the routes manual at http://routes.groovie.org/docs/
"""
from pylons import config
from routes import Mapper
def make_map():
"""Create, configure and return the routes Mapper"""
map = Mapper(directory=config['pylons.paths']['controllers'],
always_scan=config['debug'])
# The ErrorController route (handles 404/500 error pages); it should
# likely stay at the top, ensuring it can always be resolved
map.connect('error/:action/:id', controller='error')
# CUSTOM ROUTES HERE
map.connect('', controller='index', action='index')
map.connect(':controller/:action/:id')
map.connect('*url', controller='template', action='view')
return map