Show More
@@ -21,19 +21,23 b' def make_map(config):' | |||||
21 | # CUSTOM ROUTES HERE |
|
21 | # CUSTOM ROUTES HERE | |
22 | map.connect('hg_home', '/', controller='hg', action='index') |
|
22 | map.connect('hg_home', '/', controller='hg', action='index') | |
23 |
|
23 | |||
|
24 | ||||
|
25 | #REST controllers | |||
24 | map.resource('repo', 'repos', path_prefix='/_admin') |
|
26 | map.resource('repo', 'repos', path_prefix='/_admin') | |
25 | map.resource('user', 'users', path_prefix='/_admin') |
|
27 | map.resource('user', 'users', path_prefix='/_admin') | |
26 |
|
28 | |||
27 |
|
29 | #ADMIN | ||
28 | with map.submapper(path_prefix='/_admin', controller='admin') as m: |
|
30 | with map.submapper(path_prefix='/_admin', controller='admin') as m: | |
29 | m.connect('admin_home', '/', action='index')#main page |
|
31 | m.connect('admin_home', '/', action='index')#main page | |
30 | m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo') |
|
32 | m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo') | |
31 |
|
33 | |||
32 |
|
34 | |||
33 |
map.connect('summary_home', '/{repo_name}/ |
|
35 | map.connect('summary_home', '/{repo_name}/summary', controller='summary') | |
34 |
map.connect(' |
|
36 | map.connect('changelog_home', '/{repo_name}/changelog', controller='changelog') | |
|
37 | map.connect('branches_home', '/{repo_name}/branches', controller='branches') | |||
|
38 | map.connect('tags_home', '/{repo_name}/tags', controller='tags') | |||
|
39 | map.connect('graph_home', '/{repo_name}/graph/{revision}', controller='graph', revision='tip') | |||
|
40 | map.connect('files_home', '/{repo_name}/files/{revision}/{path_info:.*}', controller='files', revision='tip', path_info='') | |||
35 |
|
41 | |||
36 | map.connect('hg', '/{path_info:.*}', controller='hg', |
|
|||
37 | action="view", path_info='/') |
|
|||
38 |
|
42 | |||
39 | return map |
|
43 | return map |
General Comments 0
You need to be logged in to leave comments.
Login now