Mercurial > public > src > rhodecode
annotate pylons_app/config/routing.py @ 83:db39d0ca5308
implemented Shortlog as seperate controller,
filters rewrite. Little html fixes
author | Marcin Kuzminski <marcin@python-blog.com> |
---|---|
date | Sun, 18 Apr 2010 11:23:10 +0200 |
parents | 670713507d03 |
children | 2968fb635787 |
rev | line source |
---|---|
0 | 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 routes import Mapper | |
8 | |
43 | 9 def make_map(config): |
0 | 10 """Create, configure and return the routes Mapper""" |
43 | 11 map = Mapper(directory=config['pylons.paths']['controllers'], |
12 always_scan=config['debug']) | |
0 | 13 map.minimization = False |
43 | 14 map.explicit = False |
0 | 15 |
16 # The ErrorController route (handles 404/500 error pages); it should | |
17 # likely stay at the top, ensuring it can always be resolved | |
43 | 18 map.connect('/error/{action}', controller='error') |
19 map.connect('/error/{action}/{id}', controller='error') | |
0 | 20 |
21 # CUSTOM ROUTES HERE | |
70
9a2affee4a45
Updated defaults bug of htmlfill + changed routing
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
22 map.connect('hg_home', '/', controller='hg', action='index') |
47
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
44
diff
changeset
|
23 |
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
44
diff
changeset
|
24 map.resource('repo', 'repos', path_prefix='/_admin') |
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
44
diff
changeset
|
25 map.resource('user', 'users', path_prefix='/_admin') |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
26 |
70
9a2affee4a45
Updated defaults bug of htmlfill + changed routing
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
27 |
9a2affee4a45
Updated defaults bug of htmlfill + changed routing
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
28 with map.submapper(path_prefix='/_admin', controller='admin') as m: |
9a2affee4a45
Updated defaults bug of htmlfill + changed routing
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
29 m.connect('admin_home', '/', action='index')#main page |
9a2affee4a45
Updated defaults bug of htmlfill + changed routing
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
30 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo') |
74
cdf4fda66dd9
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
70
diff
changeset
|
31 |
cdf4fda66dd9
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
70
diff
changeset
|
32 |
82
670713507d03
Moved summary to seperate controller,
Marcin Kuzminski <marcin@python-blog.com>
parents:
80
diff
changeset
|
33 map.connect('summary_home', '/{repo_name}/_summary', controller='summary') |
83
db39d0ca5308
implemented Shortlog as seperate controller,
Marcin Kuzminski <marcin@python-blog.com>
parents:
82
diff
changeset
|
34 map.connect('shortlog_home', '/{repo_name}/_shortlog', controller='shortlog') |
80
928416088790
reimplemented summary page,
Marcin Kuzminski <marcin@python-blog.com>
parents:
74
diff
changeset
|
35 |
43 | 36 map.connect('hg', '/{path_info:.*}', controller='hg', |
37 action="view", path_info='/') | |
0 | 38 |
39 return map |