Show More
@@ -1,25 +1,28 b'' | |||
|
1 | 1 | """Routes configuration |
|
2 | 2 | |
|
3 | 3 | The more specific and detailed routes should be defined first so they |
|
4 | 4 | may take precedent over the more generic routes. For more information |
|
5 | 5 | refer to the routes manual at http://routes.groovie.org/docs/ |
|
6 | 6 | """ |
|
7 | 7 | from pylons import config |
|
8 | 8 | from routes import Mapper |
|
9 | 9 | |
|
10 | 10 | def make_map(): |
|
11 | 11 | """Create, configure and return the routes Mapper""" |
|
12 | 12 | map = Mapper(directory = config['pylons.paths']['controllers'], |
|
13 | 13 | always_scan = config['debug']) |
|
14 | 14 | map.minimization = False |
|
15 | 15 | |
|
16 | 16 | # The ErrorController route (handles 404/500 error pages); it should |
|
17 | 17 | # likely stay at the top, ensuring it can always be resolved |
|
18 | 18 | map.connect('/error/{action}', controller = 'error') |
|
19 | 19 | map.connect('/error/{action}/{id}', controller = 'error') |
|
20 | 20 | |
|
21 | 21 | # CUSTOM ROUTES HERE |
|
22 | map.connect('hg', '/{path_info:.*}', controller = 'hg', action = "view", | |
|
22 | map.connect('hg_add', '/add/{new_repo:[a-z]*}', | |
|
23 | controller = 'hg', action = 'add_repo') | |
|
24 | map.connect('hg', '/{path_info:.*}', | |
|
25 | controller = 'hg', action = "view", | |
|
23 | 26 | path_info = '/', conditions = {'method':'GET'}) |
|
24 | 27 | |
|
25 | 28 | return map |
General Comments 0
You need to be logged in to leave comments.
Login now