Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (22 sloc) 0.978 kb
f881499 Evan Broder Create Pylons app
authored
1 """Routes configuration
2
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/
6 """
7 from pylons import config
8 from routes import Mapper
9
10 def make_map():
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
15
16 # The ErrorController route (handles 404/500 error pages); it should
17 # likely stay at the top, ensuring it can always be resolved
18 map.connect('error/:action/:id', controller='error')
19
20 # CUSTOM ROUTES HERE
0ac94d8 Evan Broder Replace index page with index action of status controller
authored
21 map.connect('/', controller='status', action='index')
58a3e99 Evan Broder Copy over some changes to the stock template from BlueRhapsody
authored
22 map.connect('/:controller')
23 map.connect('/:controller/:action')
f881499 Evan Broder Create Pylons app
authored
24 map.connect('/:controller/:action/:id')
a2f4885 Evan Broder Make template controller last line of defense against 404s
authored
25 map.connect('/*url', controller='template', action='index')
f881499 Evan Broder Create Pylons app
authored
26
27 return map
Something went wrong with that request. Please try again.