source: TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/pylonsapp/pylonsapp/config/routing.py @ 7077

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/pylonsapp/pylonsapp/config/routing.py@7077
Revision 7077, 927 bytes checked in by pjkersha, 11 years ago (diff)
  • Property svn:keywords set to Id
Line 
1"""Routes configuration
2
3The more specific and detailed routes should be defined first so they
4may take precedent over the more generic routes. For more information
5refer to the routes manual at http://routes.groovie.org/docs/
6"""
7from routes import Mapper
8
9def make_map(config):
10    """Create, configure and return the routes Mapper"""
11    map = Mapper(directory=config['pylons.paths']['controllers'],
12                 always_scan=config['debug'])
13    map.minimization = False
14
15    # The ErrorController route (handles 404/500 error pages); it should
16    # likely stay at the top, ensuring it can always be resolved
17    map.connect('/error/{action}', controller='error')
18    map.connect('/error/{action}/{id}', controller='error')
19
20    # CUSTOM ROUTES HERE
21    map.connect('/secured/{action}', controller='secured')
22   
23    map.connect('/{controller}/{action}')
24    map.connect('/{controller}/{action}/{id}')
25
26    return map
Note: See TracBrowser for help on using the repository browser.