1 """Routes configuration
3 The more specific and detailed routes should be defined first so they
4 may take precedent over the more generic routes. For more information
5 refer to the routes manual at http://routes.groovie.org/docs/
7 from pylons
import config
8 from routes
import Mapper
11 """Create, configure and return the routes Mapper"""
12 map = Mapper(directory
=config
['pylons.paths']['controllers'],
13 always_scan
=config
['debug'])
14 map.minimization
= False
16 require_POST
= dict(conditions
={'method': ['POST']})
18 # The ErrorController route (handles 404/500 error pages); it should
19 # likely stay at the top, ensuring it can always be resolved
20 map.connect('/error/{action}', controller
='error')
21 map.connect('/error/{action}/{id}', controller
='error')
23 map.connect('/', controller
='main', action
='index')
25 map.connect('/account/login', controller
='account', action
='login')
26 map.connect('/account/login_begin', controller
='account', action
='login_begin', **require_POST
)
27 map.connect('/account/login_finish', controller
='account', action
='login_finish')
29 map.connect('/{controller}/{action}')
30 map.connect('/{controller}/{action}/{id}')