Mercurial > kallithea
annotate rhodecode/config/routing.py @ 1211:a7e7c0fab9db beta
pep8ify
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 05 Apr 2011 12:32:50 +0200 |
parents | f4807acf643d |
children | a2dba9356c64 |
rev | line source |
---|---|
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
1 """ |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
2 Routes configuration |
0 | 3 |
4 The more specific and detailed routes should be defined first so they | |
5 may take precedent over the more generic routes. For more information | |
6 refer to the routes manual at http://routes.groovie.org/docs/ | |
7 """ | |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
8 from __future__ import with_statement |
0 | 9 from routes import Mapper |
547
1e757ac98988
renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
530
diff
changeset
|
10 from rhodecode.lib.utils import check_repo_fast as cr |
0 | 11 |
1205
f4807acf643d
added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
12 |
43 | 13 def make_map(config): |
0 | 14 """Create, configure and return the routes Mapper""" |
1211 | 15 rmap = Mapper(directory=config['pylons.paths']['controllers'], |
43 | 16 always_scan=config['debug']) |
1211 | 17 rmap.minimization = False |
18 rmap.explicit = False | |
0 | 19 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
20 def check_repo(environ, match_dict): |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
21 """ |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
22 check for valid repository for proper 404 handling |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
23 :param environ: |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
24 :param match_dict: |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
25 """ |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
26 repo_name = match_dict.get('repo_name') |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
27 return not cr(repo_name, config['base_path']) |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
28 |
0 | 29 # The ErrorController route (handles 404/500 error pages); it should |
30 # likely stay at the top, ensuring it can always be resolved | |
1211 | 31 rmap.connect('/error/{action}', controller='error') |
32 rmap.connect('/error/{action}/{id}', controller='error') | |
0 | 33 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
34 #========================================================================== |
0 | 35 # CUSTOM ROUTES HERE |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
36 #========================================================================== |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
37 |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
38 #MAIN PAGE |
1211 | 39 rmap.connect('home', '/', controller='home', action='index') |
40 rmap.connect('bugtracker', | |
41 "http://bitbucket.org/marcinkuzminski/rhodecode/issues", | |
42 _static=True) | |
43 rmap.connect('rhodecode_official', "http://rhodecode.org", _static=True) | |
1143
0e6035a85980
added changes made in production branch back into beta
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
44 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
45 #ADMIN REPOSITORY REST ROUTES |
1211 | 46 with rmap.submapper(path_prefix='/_admin', controller='admin/repos') as m: |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
47 m.connect("repos", "/repos", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
48 action="create", conditions=dict(method=["POST"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
49 m.connect("repos", "/repos", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
50 action="index", conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
51 m.connect("formatted_repos", "/repos.{format}", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
52 action="index", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
53 conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
54 m.connect("new_repo", "/repos/new", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
55 action="new", conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
56 m.connect("formatted_new_repo", "/repos/new.{format}", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
57 action="new", conditions=dict(method=["GET"])) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
58 m.connect("/repos/{repo_name:.*}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
59 action="update", conditions=dict(method=["PUT"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
60 function=check_repo)) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
61 m.connect("/repos/{repo_name:.*}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
62 action="delete", conditions=dict(method=["DELETE"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
63 function=check_repo)) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
64 m.connect("edit_repo", "/repos/{repo_name:.*}/edit", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
65 action="edit", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
66 function=check_repo)) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
67 m.connect("formatted_edit_repo", "/repos/{repo_name:.*}.{format}/edit", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
68 action="edit", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
69 function=check_repo)) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
70 m.connect("repo", "/repos/{repo_name:.*}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
71 action="show", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
72 function=check_repo)) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
73 m.connect("formatted_repo", "/repos/{repo_name:.*}.{format}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
74 action="show", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
75 function=check_repo)) |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
76 #ajax delete repo perm user |
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
77 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
78 action="delete_perm_user", conditions=dict(method=["DELETE"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
79 function=check_repo)) |
1015
65129c332d37
#56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
976
diff
changeset
|
80 #ajax delete repo perm users_group |
1211 | 81 m.connect('delete_repo_users_group', |
82 "/repos_delete_users_group/{repo_name:.*}", | |
83 action="delete_perm_users_group", | |
84 conditions=dict(method=["DELETE"], function=check_repo)) | |
1015
65129c332d37
#56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
976
diff
changeset
|
85 |
708
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
86 #settings actions |
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
87 m.connect('repo_stats', "/repos_stats/{repo_name:.*}", |
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
88 action="repo_stats", conditions=dict(method=["DELETE"], |
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
89 function=check_repo)) |
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
90 m.connect('repo_cache', "/repos_cache/{repo_name:.*}", |
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
91 action="repo_cache", conditions=dict(method=["DELETE"], |
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
92 function=check_repo)) |
1211 | 93 m.connect('repo_public_journal', |
94 "/repos_public_journal/{repo_name:.*}", | |
95 action="repo_public_journal", conditions=dict(method=["PUT"], | |
96 function=check_repo)) | |
1114
4de3fa6290a7
#109, added manual pull of changes for repositories that have remote location filled in.
Marcin Kuzminski <marcin@python-works.com>
parents:
1088
diff
changeset
|
97 m.connect('repo_pull', "/repo_pull/{repo_name:.*}", |
4de3fa6290a7
#109, added manual pull of changes for repositories that have remote location filled in.
Marcin Kuzminski <marcin@python-works.com>
parents:
1088
diff
changeset
|
98 action="repo_pull", conditions=dict(method=["PUT"], |
4de3fa6290a7
#109, added manual pull of changes for repositories that have remote location filled in.
Marcin Kuzminski <marcin@python-works.com>
parents:
1088
diff
changeset
|
99 function=check_repo)) |
4de3fa6290a7
#109, added manual pull of changes for repositories that have remote location filled in.
Marcin Kuzminski <marcin@python-works.com>
parents:
1088
diff
changeset
|
100 |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1158
diff
changeset
|
101 #ADMIN REPOS GROUP REST ROUTES |
1211 | 102 rmap.resource('repos_group', 'repos_groups', |
103 controller='admin/repos_groups', path_prefix='/_admin') | |
959
fff21c9b075c
#56 fixed found bugs, implemented adding of new group + forms+validators
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
104 |
fff21c9b075c
#56 fixed found bugs, implemented adding of new group + forms+validators
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
105 #ADMIN USER REST ROUTES |
1211 | 106 rmap.resource('user', 'users', controller='admin/users', |
107 path_prefix='/_admin') | |
959
fff21c9b075c
#56 fixed found bugs, implemented adding of new group + forms+validators
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
108 |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1158
diff
changeset
|
109 #ADMIN USERS REST ROUTES |
1211 | 110 rmap.resource('users_group', 'users_groups', |
111 controller='admin/users_groups', path_prefix='/_admin') | |
956
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
872
diff
changeset
|
112 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
872
diff
changeset
|
113 #ADMIN GROUP REST ROUTES |
1211 | 114 rmap.resource('group', 'groups', controller='admin/groups', |
115 path_prefix='/_admin') | |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
116 |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
117 #ADMIN PERMISSIONS REST ROUTES |
1211 | 118 rmap.resource('permission', 'permissions', |
119 controller='admin/permissions', path_prefix='/_admin') | |
769
4bdcc08b04c4
fixes #77 moved out ldap config to it's own section
Marcin Kuzminski <marcin@python-works.com>
parents:
734
diff
changeset
|
120 |
4bdcc08b04c4
fixes #77 moved out ldap config to it's own section
Marcin Kuzminski <marcin@python-works.com>
parents:
734
diff
changeset
|
121 ##ADMIN LDAP SETTINGS |
1211 | 122 rmap.connect('ldap_settings', '/_admin/ldap', |
123 controller='admin/ldap_settings', action='ldap_settings', | |
124 conditions=dict(method=["POST"])) | |
125 rmap.connect('ldap_home', '/_admin/ldap', | |
126 controller='admin/ldap_settings') | |
705
9e9f1b919c0c
implements #60, ldap configuration and authentication.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
127 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
128 #ADMIN SETTINGS REST ROUTES |
1211 | 129 with rmap.submapper(path_prefix='/_admin', |
130 controller='admin/settings') as m: | |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
131 m.connect("admin_settings", "/settings", |
1211 | 132 action="create", conditions=dict(method=["POST"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
133 m.connect("admin_settings", "/settings", |
1211 | 134 action="index", conditions=dict(method=["GET"])) |
459
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
406
diff
changeset
|
135 m.connect("formatted_admin_settings", "/settings.{format}", |
1211 | 136 action="index", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
137 m.connect("admin_new_setting", "/settings/new", |
1211 | 138 action="new", conditions=dict(method=["GET"])) |
459
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
406
diff
changeset
|
139 m.connect("formatted_admin_new_setting", "/settings/new.{format}", |
1211 | 140 action="new", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
141 m.connect("/settings/{setting_id}", |
1211 | 142 action="update", conditions=dict(method=["PUT"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
143 m.connect("/settings/{setting_id}", |
1211 | 144 action="delete", conditions=dict(method=["DELETE"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
145 m.connect("admin_edit_setting", "/settings/{setting_id}/edit", |
1211 | 146 action="edit", conditions=dict(method=["GET"])) |
147 m.connect("formatted_admin_edit_setting", | |
148 "/settings/{setting_id}.{format}/edit", | |
149 action="edit", conditions=dict(method=["GET"])) | |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
150 m.connect("admin_setting", "/settings/{setting_id}", |
1211 | 151 action="show", conditions=dict(method=["GET"])) |
459
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
406
diff
changeset
|
152 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}", |
1211 | 153 action="show", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
154 m.connect("admin_settings_my_account", "/my_account", |
1211 | 155 action="my_account", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
156 m.connect("admin_settings_my_account_update", "/my_account_update", |
1211 | 157 action="my_account_update", conditions=dict(method=["PUT"])) |
380
ca54622e39a1
Added separate create repository views for non administrative users.
Marcin Kuzminski <marcin@python-works.com>
parents:
371
diff
changeset
|
158 m.connect("admin_settings_create_repository", "/create_repository", |
1211 | 159 action="create_repository", conditions=dict(method=["GET"])) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
160 |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
161 #ADMIN MAIN PAGES |
1211 | 162 with rmap.submapper(path_prefix='/_admin', controller='admin/admin') as m: |
163 m.connect('admin_home', '', action='index') | |
149
b3c93efd1c97
Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents:
148
diff
changeset
|
164 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', |
b3c93efd1c97
Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents:
148
diff
changeset
|
165 action='add_repo') |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
166 |
1211 | 167 #USER JOURNAL |
168 rmap.connect('journal', '/_admin/journal', controller='journal') | |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
169 |
1211 | 170 rmap.connect('public_journal', '/_admin/public_journal', |
171 controller='journal', action="public_journal") | |
172 | |
173 rmap.connect('public_journal_rss', '/_admin/public_journal_rss', | |
174 controller='journal', action="public_journal_rss") | |
1088
fee472613dfa
made simple global rss and atom feed
Marcin Kuzminski <marcin@python-works.com>
parents:
1085
diff
changeset
|
175 |
1211 | 176 rmap.connect('public_journal_atom', '/_admin/public_journal_atom', |
177 controller='journal', action="public_journal_atom") | |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
178 |
1211 | 179 rmap.connect('toggle_following', '/_admin/toggle_following', |
180 controller='journal', action='toggle_following', | |
181 conditions=dict(method=["POST"])) | |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
182 |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
380
diff
changeset
|
183 #SEARCH |
1211 | 184 rmap.connect('search', '/_admin/search', controller='search',) |
185 rmap.connect('search_repo', '/_admin/search/{search_repo:.*}', | |
186 controller='search') | |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
187 |
474
a3d9d24acbec
Implemented password reset(forms/models/ tasks) and mailing tasks.
Marcin Kuzminski <marcin@python-works.com>
parents:
466
diff
changeset
|
188 #LOGIN/LOGOUT/REGISTER/SIGN IN |
1211 | 189 rmap.connect('login_home', '/_admin/login', controller='login') |
190 rmap.connect('logout_home', '/_admin/logout', controller='login', | |
191 action='logout') | |
192 | |
193 rmap.connect('register', '/_admin/register', controller='login', | |
194 action='register') | |
195 | |
196 rmap.connect('reset_password', '/_admin/password_reset', | |
197 controller='login', action='password_reset') | |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
198 |
205
66b20f525750
Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
181
diff
changeset
|
199 #FEEDS |
1211 | 200 rmap.connect('rss_feed_home', '/{repo_name:.*}/feed/rss', |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
201 controller='feed', action='rss', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
202 conditions=dict(function=check_repo)) |
1211 | 203 |
204 rmap.connect('atom_feed_home', '/{repo_name:.*}/feed/atom', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
205 controller='feed', action='atom', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
206 conditions=dict(function=check_repo)) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
207 |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
208 #REPOSITORY ROUTES |
1211 | 209 rmap.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}', |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
210 controller='changeset', revision='tip', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
211 conditions=dict(function=check_repo)) |
1211 | 212 |
213 rmap.connect('raw_changeset_home', | |
214 '/{repo_name:.*}/raw-changeset/{revision}', | |
215 controller='changeset', action='raw_changeset', | |
216 revision='tip', conditions=dict(function=check_repo)) | |
217 | |
218 rmap.connect('summary_home', '/{repo_name:.*}', | |
976
de535f8b1e8b
Fixed links for repository, it's optional now to pass a link without a summary
Marcin Kuzminski <marcin@python-works.com>
parents:
959
diff
changeset
|
219 controller='summary', conditions=dict(function=check_repo)) |
1211 | 220 |
221 rmap.connect('summary_home', '/{repo_name:.*}/summary', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
222 controller='summary', conditions=dict(function=check_repo)) |
1211 | 223 |
224 rmap.connect('shortlog_home', '/{repo_name:.*}/shortlog', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
225 controller='shortlog', conditions=dict(function=check_repo)) |
1211 | 226 |
227 rmap.connect('branches_home', '/{repo_name:.*}/branches', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
228 controller='branches', conditions=dict(function=check_repo)) |
1211 | 229 |
230 rmap.connect('tags_home', '/{repo_name:.*}/tags', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
231 controller='tags', conditions=dict(function=check_repo)) |
1211 | 232 |
233 rmap.connect('changelog_home', '/{repo_name:.*}/changelog', | |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
234 controller='changelog', conditions=dict(function=check_repo)) |
1211 | 235 |
236 rmap.connect('files_home', '/{repo_name:.*}/files/{revision}/{f_path:.*}', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
237 controller='files', revision='tip', f_path='', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
238 conditions=dict(function=check_repo)) |
1211 | 239 |
240 rmap.connect('files_diff_home', '/{repo_name:.*}/diff/{f_path:.*}', | |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
241 controller='files', action='diff', revision='tip', f_path='', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
242 conditions=dict(function=check_repo)) |
1211 | 243 |
244 rmap.connect('files_rawfile_home', | |
245 '/{repo_name:.*}/rawfile/{revision}/{f_path:.*}', | |
246 controller='files', action='rawfile', revision='tip', | |
247 f_path='', conditions=dict(function=check_repo)) | |
248 | |
249 rmap.connect('files_raw_home', | |
250 '/{repo_name:.*}/raw/{revision}/{f_path:.*}', | |
251 controller='files', action='raw', revision='tip', f_path='', | |
252 conditions=dict(function=check_repo)) | |
253 | |
254 rmap.connect('files_annotate_home', | |
255 '/{repo_name:.*}/annotate/{revision}/{f_path:.*}', | |
256 controller='files', action='annotate', revision='tip', | |
257 f_path='', conditions=dict(function=check_repo)) | |
258 | |
259 rmap.connect('files_archive_home', '/{repo_name:.*}/archive/{fname}', | |
872
b956e6f415a2
implemented #91,
Marcin Kuzminski <marcin@python-works.com>
parents:
769
diff
changeset
|
260 controller='files', action='archivefile', |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
261 conditions=dict(function=check_repo)) |
1211 | 262 |
263 rmap.connect('repo_settings_delete', '/{repo_name:.*}/settings', | |
525
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
485
diff
changeset
|
264 controller='settings', action="delete", |
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
485
diff
changeset
|
265 conditions=dict(method=["DELETE"], function=check_repo)) |
1211 | 266 |
267 rmap.connect('repo_settings_update', '/{repo_name:.*}/settings', | |
320
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
306
diff
changeset
|
268 controller='settings', action="update", |
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
306
diff
changeset
|
269 conditions=dict(method=["PUT"], function=check_repo)) |
1211 | 270 |
271 rmap.connect('repo_settings_home', '/{repo_name:.*}/settings', | |
320
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
306
diff
changeset
|
272 controller='settings', action='index', |
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
306
diff
changeset
|
273 conditions=dict(function=check_repo)) |
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
306
diff
changeset
|
274 |
1211 | 275 rmap.connect('repo_fork_create_home', '/{repo_name:.*}/fork', |
530
a08f610e545e
Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents:
525
diff
changeset
|
276 controller='settings', action='fork_create', |
a08f610e545e
Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents:
525
diff
changeset
|
277 conditions=dict(function=check_repo, method=["POST"])) |
1211 | 278 |
279 rmap.connect('repo_fork_home', '/{repo_name:.*}/fork', | |
525
87d80c84df09
added search in specific repository
Marcin Kuzminski <marcin@python-works.com>
parents:
485
diff
changeset
|
280 controller='settings', action='fork', |
530
a08f610e545e
Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents:
525
diff
changeset
|
281 conditions=dict(function=check_repo)) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
282 |
1211 | 283 return rmap |