##// END OF EJS Templates
branch-permissions: fixed ce view. Fixes #5656
milka -
r4668:972bf4bf default
parent child Browse files
Show More
@@ -1,1227 +1,1227 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # Copyright (C) 2016-2020 RhodeCode GmbH
3 # Copyright (C) 2016-2020 RhodeCode GmbH
4 #
4 #
5 # This program is free software: you can redistribute it and/or modify
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
7 # (only), as published by the Free Software Foundation.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU Affero General Public License
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
16 #
17 # This program is dual-licensed. If you wish to learn more about the
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 from rhodecode.apps._base import add_route_with_slash
20 from rhodecode.apps._base import add_route_with_slash
21
21
22
22
23 def includeme(config):
23 def includeme(config):
24 from rhodecode.apps.repository.views.repo_artifacts import RepoArtifactsView
24 from rhodecode.apps.repository.views.repo_artifacts import RepoArtifactsView
25 from rhodecode.apps.repository.views.repo_audit_logs import AuditLogsView
25 from rhodecode.apps.repository.views.repo_audit_logs import AuditLogsView
26 from rhodecode.apps.repository.views.repo_automation import RepoAutomationView
26 from rhodecode.apps.repository.views.repo_automation import RepoAutomationView
27 from rhodecode.apps.repository.views.repo_bookmarks import RepoBookmarksView
27 from rhodecode.apps.repository.views.repo_bookmarks import RepoBookmarksView
28 from rhodecode.apps.repository.views.repo_branch_permissions import RepoSettingsBranchPermissionsView
28 from rhodecode.apps.repository.views.repo_branch_permissions import RepoSettingsBranchPermissionsView
29 from rhodecode.apps.repository.views.repo_branches import RepoBranchesView
29 from rhodecode.apps.repository.views.repo_branches import RepoBranchesView
30 from rhodecode.apps.repository.views.repo_caches import RepoCachesView
30 from rhodecode.apps.repository.views.repo_caches import RepoCachesView
31 from rhodecode.apps.repository.views.repo_changelog import RepoChangelogView
31 from rhodecode.apps.repository.views.repo_changelog import RepoChangelogView
32 from rhodecode.apps.repository.views.repo_checks import RepoChecksView
32 from rhodecode.apps.repository.views.repo_checks import RepoChecksView
33 from rhodecode.apps.repository.views.repo_commits import RepoCommitsView
33 from rhodecode.apps.repository.views.repo_commits import RepoCommitsView
34 from rhodecode.apps.repository.views.repo_compare import RepoCompareView
34 from rhodecode.apps.repository.views.repo_compare import RepoCompareView
35 from rhodecode.apps.repository.views.repo_feed import RepoFeedView
35 from rhodecode.apps.repository.views.repo_feed import RepoFeedView
36 from rhodecode.apps.repository.views.repo_files import RepoFilesView
36 from rhodecode.apps.repository.views.repo_files import RepoFilesView
37 from rhodecode.apps.repository.views.repo_forks import RepoForksView
37 from rhodecode.apps.repository.views.repo_forks import RepoForksView
38 from rhodecode.apps.repository.views.repo_maintainance import RepoMaintenanceView
38 from rhodecode.apps.repository.views.repo_maintainance import RepoMaintenanceView
39 from rhodecode.apps.repository.views.repo_permissions import RepoSettingsPermissionsView
39 from rhodecode.apps.repository.views.repo_permissions import RepoSettingsPermissionsView
40 from rhodecode.apps.repository.views.repo_pull_requests import RepoPullRequestsView
40 from rhodecode.apps.repository.views.repo_pull_requests import RepoPullRequestsView
41 from rhodecode.apps.repository.views.repo_review_rules import RepoReviewRulesView
41 from rhodecode.apps.repository.views.repo_review_rules import RepoReviewRulesView
42 from rhodecode.apps.repository.views.repo_settings import RepoSettingsView
42 from rhodecode.apps.repository.views.repo_settings import RepoSettingsView
43 from rhodecode.apps.repository.views.repo_settings_advanced import RepoSettingsAdvancedView
43 from rhodecode.apps.repository.views.repo_settings_advanced import RepoSettingsAdvancedView
44 from rhodecode.apps.repository.views.repo_settings_fields import RepoSettingsFieldsView
44 from rhodecode.apps.repository.views.repo_settings_fields import RepoSettingsFieldsView
45 from rhodecode.apps.repository.views.repo_settings_issue_trackers import RepoSettingsIssueTrackersView
45 from rhodecode.apps.repository.views.repo_settings_issue_trackers import RepoSettingsIssueTrackersView
46 from rhodecode.apps.repository.views.repo_settings_remote import RepoSettingsRemoteView
46 from rhodecode.apps.repository.views.repo_settings_remote import RepoSettingsRemoteView
47 from rhodecode.apps.repository.views.repo_settings_vcs import RepoSettingsVcsView
47 from rhodecode.apps.repository.views.repo_settings_vcs import RepoSettingsVcsView
48 from rhodecode.apps.repository.views.repo_strip import RepoStripView
48 from rhodecode.apps.repository.views.repo_strip import RepoStripView
49 from rhodecode.apps.repository.views.repo_summary import RepoSummaryView
49 from rhodecode.apps.repository.views.repo_summary import RepoSummaryView
50 from rhodecode.apps.repository.views.repo_tags import RepoTagsView
50 from rhodecode.apps.repository.views.repo_tags import RepoTagsView
51
51
52 # repo creating checks, special cases that aren't repo routes
52 # repo creating checks, special cases that aren't repo routes
53 config.add_route(
53 config.add_route(
54 name='repo_creating',
54 name='repo_creating',
55 pattern='/{repo_name:.*?[^/]}/repo_creating')
55 pattern='/{repo_name:.*?[^/]}/repo_creating')
56 config.add_view(
56 config.add_view(
57 RepoChecksView,
57 RepoChecksView,
58 attr='repo_creating',
58 attr='repo_creating',
59 route_name='repo_creating', request_method='GET',
59 route_name='repo_creating', request_method='GET',
60 renderer='rhodecode:templates/admin/repos/repo_creating.mako')
60 renderer='rhodecode:templates/admin/repos/repo_creating.mako')
61
61
62 config.add_route(
62 config.add_route(
63 name='repo_creating_check',
63 name='repo_creating_check',
64 pattern='/{repo_name:.*?[^/]}/repo_creating_check')
64 pattern='/{repo_name:.*?[^/]}/repo_creating_check')
65 config.add_view(
65 config.add_view(
66 RepoChecksView,
66 RepoChecksView,
67 attr='repo_creating_check',
67 attr='repo_creating_check',
68 route_name='repo_creating_check', request_method='GET',
68 route_name='repo_creating_check', request_method='GET',
69 renderer='json_ext')
69 renderer='json_ext')
70
70
71 # Summary
71 # Summary
72 # NOTE(marcink): one additional route is defined in very bottom, catch
72 # NOTE(marcink): one additional route is defined in very bottom, catch
73 # all pattern
73 # all pattern
74 config.add_route(
74 config.add_route(
75 name='repo_summary_explicit',
75 name='repo_summary_explicit',
76 pattern='/{repo_name:.*?[^/]}/summary', repo_route=True)
76 pattern='/{repo_name:.*?[^/]}/summary', repo_route=True)
77 config.add_view(
77 config.add_view(
78 RepoSummaryView,
78 RepoSummaryView,
79 attr='summary',
79 attr='summary',
80 route_name='repo_summary_explicit', request_method='GET',
80 route_name='repo_summary_explicit', request_method='GET',
81 renderer='rhodecode:templates/summary/summary.mako')
81 renderer='rhodecode:templates/summary/summary.mako')
82
82
83 config.add_route(
83 config.add_route(
84 name='repo_summary_commits',
84 name='repo_summary_commits',
85 pattern='/{repo_name:.*?[^/]}/summary-commits', repo_route=True)
85 pattern='/{repo_name:.*?[^/]}/summary-commits', repo_route=True)
86 config.add_view(
86 config.add_view(
87 RepoSummaryView,
87 RepoSummaryView,
88 attr='summary_commits',
88 attr='summary_commits',
89 route_name='repo_summary_commits', request_method='GET',
89 route_name='repo_summary_commits', request_method='GET',
90 renderer='rhodecode:templates/summary/summary_commits.mako')
90 renderer='rhodecode:templates/summary/summary_commits.mako')
91
91
92 # Commits
92 # Commits
93 config.add_route(
93 config.add_route(
94 name='repo_commit',
94 name='repo_commit',
95 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}', repo_route=True)
95 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}', repo_route=True)
96 config.add_view(
96 config.add_view(
97 RepoCommitsView,
97 RepoCommitsView,
98 attr='repo_commit_show',
98 attr='repo_commit_show',
99 route_name='repo_commit', request_method='GET',
99 route_name='repo_commit', request_method='GET',
100 renderer=None)
100 renderer=None)
101
101
102 config.add_route(
102 config.add_route(
103 name='repo_commit_children',
103 name='repo_commit_children',
104 pattern='/{repo_name:.*?[^/]}/changeset_children/{commit_id}', repo_route=True)
104 pattern='/{repo_name:.*?[^/]}/changeset_children/{commit_id}', repo_route=True)
105 config.add_view(
105 config.add_view(
106 RepoCommitsView,
106 RepoCommitsView,
107 attr='repo_commit_children',
107 attr='repo_commit_children',
108 route_name='repo_commit_children', request_method='GET',
108 route_name='repo_commit_children', request_method='GET',
109 renderer='json_ext', xhr=True)
109 renderer='json_ext', xhr=True)
110
110
111 config.add_route(
111 config.add_route(
112 name='repo_commit_parents',
112 name='repo_commit_parents',
113 pattern='/{repo_name:.*?[^/]}/changeset_parents/{commit_id}', repo_route=True)
113 pattern='/{repo_name:.*?[^/]}/changeset_parents/{commit_id}', repo_route=True)
114 config.add_view(
114 config.add_view(
115 RepoCommitsView,
115 RepoCommitsView,
116 attr='repo_commit_parents',
116 attr='repo_commit_parents',
117 route_name='repo_commit_parents', request_method='GET',
117 route_name='repo_commit_parents', request_method='GET',
118 renderer='json_ext')
118 renderer='json_ext')
119
119
120 config.add_route(
120 config.add_route(
121 name='repo_commit_raw',
121 name='repo_commit_raw',
122 pattern='/{repo_name:.*?[^/]}/changeset-diff/{commit_id}', repo_route=True)
122 pattern='/{repo_name:.*?[^/]}/changeset-diff/{commit_id}', repo_route=True)
123 config.add_view(
123 config.add_view(
124 RepoCommitsView,
124 RepoCommitsView,
125 attr='repo_commit_raw',
125 attr='repo_commit_raw',
126 route_name='repo_commit_raw', request_method='GET',
126 route_name='repo_commit_raw', request_method='GET',
127 renderer=None)
127 renderer=None)
128
128
129 config.add_route(
129 config.add_route(
130 name='repo_commit_patch',
130 name='repo_commit_patch',
131 pattern='/{repo_name:.*?[^/]}/changeset-patch/{commit_id}', repo_route=True)
131 pattern='/{repo_name:.*?[^/]}/changeset-patch/{commit_id}', repo_route=True)
132 config.add_view(
132 config.add_view(
133 RepoCommitsView,
133 RepoCommitsView,
134 attr='repo_commit_patch',
134 attr='repo_commit_patch',
135 route_name='repo_commit_patch', request_method='GET',
135 route_name='repo_commit_patch', request_method='GET',
136 renderer=None)
136 renderer=None)
137
137
138 config.add_route(
138 config.add_route(
139 name='repo_commit_download',
139 name='repo_commit_download',
140 pattern='/{repo_name:.*?[^/]}/changeset-download/{commit_id}', repo_route=True)
140 pattern='/{repo_name:.*?[^/]}/changeset-download/{commit_id}', repo_route=True)
141 config.add_view(
141 config.add_view(
142 RepoCommitsView,
142 RepoCommitsView,
143 attr='repo_commit_download',
143 attr='repo_commit_download',
144 route_name='repo_commit_download', request_method='GET',
144 route_name='repo_commit_download', request_method='GET',
145 renderer=None)
145 renderer=None)
146
146
147 config.add_route(
147 config.add_route(
148 name='repo_commit_data',
148 name='repo_commit_data',
149 pattern='/{repo_name:.*?[^/]}/changeset-data/{commit_id}', repo_route=True)
149 pattern='/{repo_name:.*?[^/]}/changeset-data/{commit_id}', repo_route=True)
150 config.add_view(
150 config.add_view(
151 RepoCommitsView,
151 RepoCommitsView,
152 attr='repo_commit_data',
152 attr='repo_commit_data',
153 route_name='repo_commit_data', request_method='GET',
153 route_name='repo_commit_data', request_method='GET',
154 renderer='json_ext', xhr=True)
154 renderer='json_ext', xhr=True)
155
155
156 config.add_route(
156 config.add_route(
157 name='repo_commit_comment_create',
157 name='repo_commit_comment_create',
158 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/create', repo_route=True)
158 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/create', repo_route=True)
159 config.add_view(
159 config.add_view(
160 RepoCommitsView,
160 RepoCommitsView,
161 attr='repo_commit_comment_create',
161 attr='repo_commit_comment_create',
162 route_name='repo_commit_comment_create', request_method='POST',
162 route_name='repo_commit_comment_create', request_method='POST',
163 renderer='json_ext')
163 renderer='json_ext')
164
164
165 config.add_route(
165 config.add_route(
166 name='repo_commit_comment_preview',
166 name='repo_commit_comment_preview',
167 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/preview', repo_route=True)
167 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/preview', repo_route=True)
168 config.add_view(
168 config.add_view(
169 RepoCommitsView,
169 RepoCommitsView,
170 attr='repo_commit_comment_preview',
170 attr='repo_commit_comment_preview',
171 route_name='repo_commit_comment_preview', request_method='POST',
171 route_name='repo_commit_comment_preview', request_method='POST',
172 renderer='string', xhr=True)
172 renderer='string', xhr=True)
173
173
174 config.add_route(
174 config.add_route(
175 name='repo_commit_comment_history_view',
175 name='repo_commit_comment_history_view',
176 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_history_id}/history_view', repo_route=True)
176 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_history_id}/history_view', repo_route=True)
177 config.add_view(
177 config.add_view(
178 RepoCommitsView,
178 RepoCommitsView,
179 attr='repo_commit_comment_history_view',
179 attr='repo_commit_comment_history_view',
180 route_name='repo_commit_comment_history_view', request_method='POST',
180 route_name='repo_commit_comment_history_view', request_method='POST',
181 renderer='string', xhr=True)
181 renderer='string', xhr=True)
182
182
183 config.add_route(
183 config.add_route(
184 name='repo_commit_comment_attachment_upload',
184 name='repo_commit_comment_attachment_upload',
185 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/attachment_upload', repo_route=True)
185 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/attachment_upload', repo_route=True)
186 config.add_view(
186 config.add_view(
187 RepoCommitsView,
187 RepoCommitsView,
188 attr='repo_commit_comment_attachment_upload',
188 attr='repo_commit_comment_attachment_upload',
189 route_name='repo_commit_comment_attachment_upload', request_method='POST',
189 route_name='repo_commit_comment_attachment_upload', request_method='POST',
190 renderer='json_ext', xhr=True)
190 renderer='json_ext', xhr=True)
191
191
192 config.add_route(
192 config.add_route(
193 name='repo_commit_comment_delete',
193 name='repo_commit_comment_delete',
194 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_id}/delete', repo_route=True)
194 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_id}/delete', repo_route=True)
195 config.add_view(
195 config.add_view(
196 RepoCommitsView,
196 RepoCommitsView,
197 attr='repo_commit_comment_delete',
197 attr='repo_commit_comment_delete',
198 route_name='repo_commit_comment_delete', request_method='POST',
198 route_name='repo_commit_comment_delete', request_method='POST',
199 renderer='json_ext')
199 renderer='json_ext')
200
200
201 config.add_route(
201 config.add_route(
202 name='repo_commit_comment_edit',
202 name='repo_commit_comment_edit',
203 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_id}/edit', repo_route=True)
203 pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_id}/edit', repo_route=True)
204 config.add_view(
204 config.add_view(
205 RepoCommitsView,
205 RepoCommitsView,
206 attr='repo_commit_comment_edit',
206 attr='repo_commit_comment_edit',
207 route_name='repo_commit_comment_edit', request_method='POST',
207 route_name='repo_commit_comment_edit', request_method='POST',
208 renderer='json_ext')
208 renderer='json_ext')
209
209
210 # still working url for backward compat.
210 # still working url for backward compat.
211 config.add_route(
211 config.add_route(
212 name='repo_commit_raw_deprecated',
212 name='repo_commit_raw_deprecated',
213 pattern='/{repo_name:.*?[^/]}/raw-changeset/{commit_id}', repo_route=True)
213 pattern='/{repo_name:.*?[^/]}/raw-changeset/{commit_id}', repo_route=True)
214 config.add_view(
214 config.add_view(
215 RepoCommitsView,
215 RepoCommitsView,
216 attr='repo_commit_raw',
216 attr='repo_commit_raw',
217 route_name='repo_commit_raw_deprecated', request_method='GET',
217 route_name='repo_commit_raw_deprecated', request_method='GET',
218 renderer=None)
218 renderer=None)
219
219
220 # Files
220 # Files
221 config.add_route(
221 config.add_route(
222 name='repo_archivefile',
222 name='repo_archivefile',
223 pattern='/{repo_name:.*?[^/]}/archive/{fname:.*}', repo_route=True)
223 pattern='/{repo_name:.*?[^/]}/archive/{fname:.*}', repo_route=True)
224 config.add_view(
224 config.add_view(
225 RepoFilesView,
225 RepoFilesView,
226 attr='repo_archivefile',
226 attr='repo_archivefile',
227 route_name='repo_archivefile', request_method='GET',
227 route_name='repo_archivefile', request_method='GET',
228 renderer=None)
228 renderer=None)
229
229
230 config.add_route(
230 config.add_route(
231 name='repo_files_diff',
231 name='repo_files_diff',
232 pattern='/{repo_name:.*?[^/]}/diff/{f_path:.*}', repo_route=True)
232 pattern='/{repo_name:.*?[^/]}/diff/{f_path:.*}', repo_route=True)
233 config.add_view(
233 config.add_view(
234 RepoFilesView,
234 RepoFilesView,
235 attr='repo_files_diff',
235 attr='repo_files_diff',
236 route_name='repo_files_diff', request_method='GET',
236 route_name='repo_files_diff', request_method='GET',
237 renderer=None)
237 renderer=None)
238
238
239 config.add_route( # legacy route to make old links work
239 config.add_route( # legacy route to make old links work
240 name='repo_files_diff_2way_redirect',
240 name='repo_files_diff_2way_redirect',
241 pattern='/{repo_name:.*?[^/]}/diff-2way/{f_path:.*}', repo_route=True)
241 pattern='/{repo_name:.*?[^/]}/diff-2way/{f_path:.*}', repo_route=True)
242 config.add_view(
242 config.add_view(
243 RepoFilesView,
243 RepoFilesView,
244 attr='repo_files_diff_2way_redirect',
244 attr='repo_files_diff_2way_redirect',
245 route_name='repo_files_diff_2way_redirect', request_method='GET',
245 route_name='repo_files_diff_2way_redirect', request_method='GET',
246 renderer=None)
246 renderer=None)
247
247
248 config.add_route(
248 config.add_route(
249 name='repo_files',
249 name='repo_files',
250 pattern='/{repo_name:.*?[^/]}/files/{commit_id}/{f_path:.*}', repo_route=True)
250 pattern='/{repo_name:.*?[^/]}/files/{commit_id}/{f_path:.*}', repo_route=True)
251 config.add_view(
251 config.add_view(
252 RepoFilesView,
252 RepoFilesView,
253 attr='repo_files',
253 attr='repo_files',
254 route_name='repo_files', request_method='GET',
254 route_name='repo_files', request_method='GET',
255 renderer=None)
255 renderer=None)
256
256
257 config.add_route(
257 config.add_route(
258 name='repo_files:default_path',
258 name='repo_files:default_path',
259 pattern='/{repo_name:.*?[^/]}/files/{commit_id}/', repo_route=True)
259 pattern='/{repo_name:.*?[^/]}/files/{commit_id}/', repo_route=True)
260 config.add_view(
260 config.add_view(
261 RepoFilesView,
261 RepoFilesView,
262 attr='repo_files',
262 attr='repo_files',
263 route_name='repo_files:default_path', request_method='GET',
263 route_name='repo_files:default_path', request_method='GET',
264 renderer=None)
264 renderer=None)
265
265
266 config.add_route(
266 config.add_route(
267 name='repo_files:default_commit',
267 name='repo_files:default_commit',
268 pattern='/{repo_name:.*?[^/]}/files', repo_route=True)
268 pattern='/{repo_name:.*?[^/]}/files', repo_route=True)
269 config.add_view(
269 config.add_view(
270 RepoFilesView,
270 RepoFilesView,
271 attr='repo_files',
271 attr='repo_files',
272 route_name='repo_files:default_commit', request_method='GET',
272 route_name='repo_files:default_commit', request_method='GET',
273 renderer=None)
273 renderer=None)
274
274
275 config.add_route(
275 config.add_route(
276 name='repo_files:rendered',
276 name='repo_files:rendered',
277 pattern='/{repo_name:.*?[^/]}/render/{commit_id}/{f_path:.*}', repo_route=True)
277 pattern='/{repo_name:.*?[^/]}/render/{commit_id}/{f_path:.*}', repo_route=True)
278 config.add_view(
278 config.add_view(
279 RepoFilesView,
279 RepoFilesView,
280 attr='repo_files',
280 attr='repo_files',
281 route_name='repo_files:rendered', request_method='GET',
281 route_name='repo_files:rendered', request_method='GET',
282 renderer=None)
282 renderer=None)
283
283
284 config.add_route(
284 config.add_route(
285 name='repo_files:annotated',
285 name='repo_files:annotated',
286 pattern='/{repo_name:.*?[^/]}/annotate/{commit_id}/{f_path:.*}', repo_route=True)
286 pattern='/{repo_name:.*?[^/]}/annotate/{commit_id}/{f_path:.*}', repo_route=True)
287 config.add_view(
287 config.add_view(
288 RepoFilesView,
288 RepoFilesView,
289 attr='repo_files',
289 attr='repo_files',
290 route_name='repo_files:annotated', request_method='GET',
290 route_name='repo_files:annotated', request_method='GET',
291 renderer=None)
291 renderer=None)
292
292
293 config.add_route(
293 config.add_route(
294 name='repo_files:annotated_previous',
294 name='repo_files:annotated_previous',
295 pattern='/{repo_name:.*?[^/]}/annotate-previous/{commit_id}/{f_path:.*}', repo_route=True)
295 pattern='/{repo_name:.*?[^/]}/annotate-previous/{commit_id}/{f_path:.*}', repo_route=True)
296 config.add_view(
296 config.add_view(
297 RepoFilesView,
297 RepoFilesView,
298 attr='repo_files_annotated_previous',
298 attr='repo_files_annotated_previous',
299 route_name='repo_files:annotated_previous', request_method='GET',
299 route_name='repo_files:annotated_previous', request_method='GET',
300 renderer=None)
300 renderer=None)
301
301
302 config.add_route(
302 config.add_route(
303 name='repo_nodetree_full',
303 name='repo_nodetree_full',
304 pattern='/{repo_name:.*?[^/]}/nodetree_full/{commit_id}/{f_path:.*}', repo_route=True)
304 pattern='/{repo_name:.*?[^/]}/nodetree_full/{commit_id}/{f_path:.*}', repo_route=True)
305 config.add_view(
305 config.add_view(
306 RepoFilesView,
306 RepoFilesView,
307 attr='repo_nodetree_full',
307 attr='repo_nodetree_full',
308 route_name='repo_nodetree_full', request_method='GET',
308 route_name='repo_nodetree_full', request_method='GET',
309 renderer=None, xhr=True)
309 renderer=None, xhr=True)
310
310
311 config.add_route(
311 config.add_route(
312 name='repo_nodetree_full:default_path',
312 name='repo_nodetree_full:default_path',
313 pattern='/{repo_name:.*?[^/]}/nodetree_full/{commit_id}/', repo_route=True)
313 pattern='/{repo_name:.*?[^/]}/nodetree_full/{commit_id}/', repo_route=True)
314 config.add_view(
314 config.add_view(
315 RepoFilesView,
315 RepoFilesView,
316 attr='repo_nodetree_full',
316 attr='repo_nodetree_full',
317 route_name='repo_nodetree_full:default_path', request_method='GET',
317 route_name='repo_nodetree_full:default_path', request_method='GET',
318 renderer=None, xhr=True)
318 renderer=None, xhr=True)
319
319
320 config.add_route(
320 config.add_route(
321 name='repo_files_nodelist',
321 name='repo_files_nodelist',
322 pattern='/{repo_name:.*?[^/]}/nodelist/{commit_id}/{f_path:.*}', repo_route=True)
322 pattern='/{repo_name:.*?[^/]}/nodelist/{commit_id}/{f_path:.*}', repo_route=True)
323 config.add_view(
323 config.add_view(
324 RepoFilesView,
324 RepoFilesView,
325 attr='repo_nodelist',
325 attr='repo_nodelist',
326 route_name='repo_files_nodelist', request_method='GET',
326 route_name='repo_files_nodelist', request_method='GET',
327 renderer='json_ext', xhr=True)
327 renderer='json_ext', xhr=True)
328
328
329 config.add_route(
329 config.add_route(
330 name='repo_file_raw',
330 name='repo_file_raw',
331 pattern='/{repo_name:.*?[^/]}/raw/{commit_id}/{f_path:.*}', repo_route=True)
331 pattern='/{repo_name:.*?[^/]}/raw/{commit_id}/{f_path:.*}', repo_route=True)
332 config.add_view(
332 config.add_view(
333 RepoFilesView,
333 RepoFilesView,
334 attr='repo_file_raw',
334 attr='repo_file_raw',
335 route_name='repo_file_raw', request_method='GET',
335 route_name='repo_file_raw', request_method='GET',
336 renderer=None)
336 renderer=None)
337
337
338 config.add_route(
338 config.add_route(
339 name='repo_file_download',
339 name='repo_file_download',
340 pattern='/{repo_name:.*?[^/]}/download/{commit_id}/{f_path:.*}', repo_route=True)
340 pattern='/{repo_name:.*?[^/]}/download/{commit_id}/{f_path:.*}', repo_route=True)
341 config.add_view(
341 config.add_view(
342 RepoFilesView,
342 RepoFilesView,
343 attr='repo_file_download',
343 attr='repo_file_download',
344 route_name='repo_file_download', request_method='GET',
344 route_name='repo_file_download', request_method='GET',
345 renderer=None)
345 renderer=None)
346
346
347 config.add_route( # backward compat to keep old links working
347 config.add_route( # backward compat to keep old links working
348 name='repo_file_download:legacy',
348 name='repo_file_download:legacy',
349 pattern='/{repo_name:.*?[^/]}/rawfile/{commit_id}/{f_path:.*}',
349 pattern='/{repo_name:.*?[^/]}/rawfile/{commit_id}/{f_path:.*}',
350 repo_route=True)
350 repo_route=True)
351 config.add_view(
351 config.add_view(
352 RepoFilesView,
352 RepoFilesView,
353 attr='repo_file_download',
353 attr='repo_file_download',
354 route_name='repo_file_download:legacy', request_method='GET',
354 route_name='repo_file_download:legacy', request_method='GET',
355 renderer=None)
355 renderer=None)
356
356
357 config.add_route(
357 config.add_route(
358 name='repo_file_history',
358 name='repo_file_history',
359 pattern='/{repo_name:.*?[^/]}/history/{commit_id}/{f_path:.*}', repo_route=True)
359 pattern='/{repo_name:.*?[^/]}/history/{commit_id}/{f_path:.*}', repo_route=True)
360 config.add_view(
360 config.add_view(
361 RepoFilesView,
361 RepoFilesView,
362 attr='repo_file_history',
362 attr='repo_file_history',
363 route_name='repo_file_history', request_method='GET',
363 route_name='repo_file_history', request_method='GET',
364 renderer='json_ext')
364 renderer='json_ext')
365
365
366 config.add_route(
366 config.add_route(
367 name='repo_file_authors',
367 name='repo_file_authors',
368 pattern='/{repo_name:.*?[^/]}/authors/{commit_id}/{f_path:.*}', repo_route=True)
368 pattern='/{repo_name:.*?[^/]}/authors/{commit_id}/{f_path:.*}', repo_route=True)
369 config.add_view(
369 config.add_view(
370 RepoFilesView,
370 RepoFilesView,
371 attr='repo_file_authors',
371 attr='repo_file_authors',
372 route_name='repo_file_authors', request_method='GET',
372 route_name='repo_file_authors', request_method='GET',
373 renderer='rhodecode:templates/files/file_authors_box.mako')
373 renderer='rhodecode:templates/files/file_authors_box.mako')
374
374
375 config.add_route(
375 config.add_route(
376 name='repo_files_check_head',
376 name='repo_files_check_head',
377 pattern='/{repo_name:.*?[^/]}/check_head/{commit_id}/{f_path:.*}',
377 pattern='/{repo_name:.*?[^/]}/check_head/{commit_id}/{f_path:.*}',
378 repo_route=True)
378 repo_route=True)
379 config.add_view(
379 config.add_view(
380 RepoFilesView,
380 RepoFilesView,
381 attr='repo_files_check_head',
381 attr='repo_files_check_head',
382 route_name='repo_files_check_head', request_method='POST',
382 route_name='repo_files_check_head', request_method='POST',
383 renderer='json_ext', xhr=True)
383 renderer='json_ext', xhr=True)
384
384
385 config.add_route(
385 config.add_route(
386 name='repo_files_remove_file',
386 name='repo_files_remove_file',
387 pattern='/{repo_name:.*?[^/]}/remove_file/{commit_id}/{f_path:.*}',
387 pattern='/{repo_name:.*?[^/]}/remove_file/{commit_id}/{f_path:.*}',
388 repo_route=True)
388 repo_route=True)
389 config.add_view(
389 config.add_view(
390 RepoFilesView,
390 RepoFilesView,
391 attr='repo_files_remove_file',
391 attr='repo_files_remove_file',
392 route_name='repo_files_remove_file', request_method='GET',
392 route_name='repo_files_remove_file', request_method='GET',
393 renderer='rhodecode:templates/files/files_delete.mako')
393 renderer='rhodecode:templates/files/files_delete.mako')
394
394
395 config.add_route(
395 config.add_route(
396 name='repo_files_delete_file',
396 name='repo_files_delete_file',
397 pattern='/{repo_name:.*?[^/]}/delete_file/{commit_id}/{f_path:.*}',
397 pattern='/{repo_name:.*?[^/]}/delete_file/{commit_id}/{f_path:.*}',
398 repo_route=True)
398 repo_route=True)
399 config.add_view(
399 config.add_view(
400 RepoFilesView,
400 RepoFilesView,
401 attr='repo_files_delete_file',
401 attr='repo_files_delete_file',
402 route_name='repo_files_delete_file', request_method='POST',
402 route_name='repo_files_delete_file', request_method='POST',
403 renderer=None)
403 renderer=None)
404
404
405 config.add_route(
405 config.add_route(
406 name='repo_files_edit_file',
406 name='repo_files_edit_file',
407 pattern='/{repo_name:.*?[^/]}/edit_file/{commit_id}/{f_path:.*}',
407 pattern='/{repo_name:.*?[^/]}/edit_file/{commit_id}/{f_path:.*}',
408 repo_route=True)
408 repo_route=True)
409 config.add_view(
409 config.add_view(
410 RepoFilesView,
410 RepoFilesView,
411 attr='repo_files_edit_file',
411 attr='repo_files_edit_file',
412 route_name='repo_files_edit_file', request_method='GET',
412 route_name='repo_files_edit_file', request_method='GET',
413 renderer='rhodecode:templates/files/files_edit.mako')
413 renderer='rhodecode:templates/files/files_edit.mako')
414
414
415 config.add_route(
415 config.add_route(
416 name='repo_files_update_file',
416 name='repo_files_update_file',
417 pattern='/{repo_name:.*?[^/]}/update_file/{commit_id}/{f_path:.*}',
417 pattern='/{repo_name:.*?[^/]}/update_file/{commit_id}/{f_path:.*}',
418 repo_route=True)
418 repo_route=True)
419 config.add_view(
419 config.add_view(
420 RepoFilesView,
420 RepoFilesView,
421 attr='repo_files_update_file',
421 attr='repo_files_update_file',
422 route_name='repo_files_update_file', request_method='POST',
422 route_name='repo_files_update_file', request_method='POST',
423 renderer=None)
423 renderer=None)
424
424
425 config.add_route(
425 config.add_route(
426 name='repo_files_add_file',
426 name='repo_files_add_file',
427 pattern='/{repo_name:.*?[^/]}/add_file/{commit_id}/{f_path:.*}',
427 pattern='/{repo_name:.*?[^/]}/add_file/{commit_id}/{f_path:.*}',
428 repo_route=True)
428 repo_route=True)
429 config.add_view(
429 config.add_view(
430 RepoFilesView,
430 RepoFilesView,
431 attr='repo_files_add_file',
431 attr='repo_files_add_file',
432 route_name='repo_files_add_file', request_method='GET',
432 route_name='repo_files_add_file', request_method='GET',
433 renderer='rhodecode:templates/files/files_add.mako')
433 renderer='rhodecode:templates/files/files_add.mako')
434
434
435 config.add_route(
435 config.add_route(
436 name='repo_files_upload_file',
436 name='repo_files_upload_file',
437 pattern='/{repo_name:.*?[^/]}/upload_file/{commit_id}/{f_path:.*}',
437 pattern='/{repo_name:.*?[^/]}/upload_file/{commit_id}/{f_path:.*}',
438 repo_route=True)
438 repo_route=True)
439 config.add_view(
439 config.add_view(
440 RepoFilesView,
440 RepoFilesView,
441 attr='repo_files_add_file',
441 attr='repo_files_add_file',
442 route_name='repo_files_upload_file', request_method='GET',
442 route_name='repo_files_upload_file', request_method='GET',
443 renderer='rhodecode:templates/files/files_upload.mako')
443 renderer='rhodecode:templates/files/files_upload.mako')
444 config.add_view( # POST creates
444 config.add_view( # POST creates
445 RepoFilesView,
445 RepoFilesView,
446 attr='repo_files_upload_file',
446 attr='repo_files_upload_file',
447 route_name='repo_files_upload_file', request_method='POST',
447 route_name='repo_files_upload_file', request_method='POST',
448 renderer='json_ext')
448 renderer='json_ext')
449
449
450 config.add_route(
450 config.add_route(
451 name='repo_files_create_file',
451 name='repo_files_create_file',
452 pattern='/{repo_name:.*?[^/]}/create_file/{commit_id}/{f_path:.*}',
452 pattern='/{repo_name:.*?[^/]}/create_file/{commit_id}/{f_path:.*}',
453 repo_route=True)
453 repo_route=True)
454 config.add_view( # POST creates
454 config.add_view( # POST creates
455 RepoFilesView,
455 RepoFilesView,
456 attr='repo_files_create_file',
456 attr='repo_files_create_file',
457 route_name='repo_files_create_file', request_method='POST',
457 route_name='repo_files_create_file', request_method='POST',
458 renderer=None)
458 renderer=None)
459
459
460 # Refs data
460 # Refs data
461 config.add_route(
461 config.add_route(
462 name='repo_refs_data',
462 name='repo_refs_data',
463 pattern='/{repo_name:.*?[^/]}/refs-data', repo_route=True)
463 pattern='/{repo_name:.*?[^/]}/refs-data', repo_route=True)
464 config.add_view(
464 config.add_view(
465 RepoSummaryView,
465 RepoSummaryView,
466 attr='repo_refs_data',
466 attr='repo_refs_data',
467 route_name='repo_refs_data', request_method='GET',
467 route_name='repo_refs_data', request_method='GET',
468 renderer='json_ext')
468 renderer='json_ext')
469
469
470 config.add_route(
470 config.add_route(
471 name='repo_refs_changelog_data',
471 name='repo_refs_changelog_data',
472 pattern='/{repo_name:.*?[^/]}/refs-data-changelog', repo_route=True)
472 pattern='/{repo_name:.*?[^/]}/refs-data-changelog', repo_route=True)
473 config.add_view(
473 config.add_view(
474 RepoSummaryView,
474 RepoSummaryView,
475 attr='repo_refs_changelog_data',
475 attr='repo_refs_changelog_data',
476 route_name='repo_refs_changelog_data', request_method='GET',
476 route_name='repo_refs_changelog_data', request_method='GET',
477 renderer='json_ext')
477 renderer='json_ext')
478
478
479 config.add_route(
479 config.add_route(
480 name='repo_stats',
480 name='repo_stats',
481 pattern='/{repo_name:.*?[^/]}/repo_stats/{commit_id}', repo_route=True)
481 pattern='/{repo_name:.*?[^/]}/repo_stats/{commit_id}', repo_route=True)
482 config.add_view(
482 config.add_view(
483 RepoSummaryView,
483 RepoSummaryView,
484 attr='repo_stats',
484 attr='repo_stats',
485 route_name='repo_stats', request_method='GET',
485 route_name='repo_stats', request_method='GET',
486 renderer='json_ext')
486 renderer='json_ext')
487
487
488 # Commits
488 # Commits
489 config.add_route(
489 config.add_route(
490 name='repo_commits',
490 name='repo_commits',
491 pattern='/{repo_name:.*?[^/]}/commits', repo_route=True)
491 pattern='/{repo_name:.*?[^/]}/commits', repo_route=True)
492 config.add_view(
492 config.add_view(
493 RepoChangelogView,
493 RepoChangelogView,
494 attr='repo_changelog',
494 attr='repo_changelog',
495 route_name='repo_commits', request_method='GET',
495 route_name='repo_commits', request_method='GET',
496 renderer='rhodecode:templates/commits/changelog.mako')
496 renderer='rhodecode:templates/commits/changelog.mako')
497 # old routes for backward compat
497 # old routes for backward compat
498 config.add_view(
498 config.add_view(
499 RepoChangelogView,
499 RepoChangelogView,
500 attr='repo_changelog',
500 attr='repo_changelog',
501 route_name='repo_changelog', request_method='GET',
501 route_name='repo_changelog', request_method='GET',
502 renderer='rhodecode:templates/commits/changelog.mako')
502 renderer='rhodecode:templates/commits/changelog.mako')
503
503
504 config.add_route(
504 config.add_route(
505 name='repo_commits_elements',
505 name='repo_commits_elements',
506 pattern='/{repo_name:.*?[^/]}/commits_elements', repo_route=True)
506 pattern='/{repo_name:.*?[^/]}/commits_elements', repo_route=True)
507 config.add_view(
507 config.add_view(
508 RepoChangelogView,
508 RepoChangelogView,
509 attr='repo_commits_elements',
509 attr='repo_commits_elements',
510 route_name='repo_commits_elements', request_method=('GET', 'POST'),
510 route_name='repo_commits_elements', request_method=('GET', 'POST'),
511 renderer='rhodecode:templates/commits/changelog_elements.mako',
511 renderer='rhodecode:templates/commits/changelog_elements.mako',
512 xhr=True)
512 xhr=True)
513
513
514 config.add_route(
514 config.add_route(
515 name='repo_commits_elements_file',
515 name='repo_commits_elements_file',
516 pattern='/{repo_name:.*?[^/]}/commits_elements/{commit_id}/{f_path:.*}', repo_route=True)
516 pattern='/{repo_name:.*?[^/]}/commits_elements/{commit_id}/{f_path:.*}', repo_route=True)
517 config.add_view(
517 config.add_view(
518 RepoChangelogView,
518 RepoChangelogView,
519 attr='repo_commits_elements',
519 attr='repo_commits_elements',
520 route_name='repo_commits_elements_file', request_method=('GET', 'POST'),
520 route_name='repo_commits_elements_file', request_method=('GET', 'POST'),
521 renderer='rhodecode:templates/commits/changelog_elements.mako',
521 renderer='rhodecode:templates/commits/changelog_elements.mako',
522 xhr=True)
522 xhr=True)
523
523
524 config.add_route(
524 config.add_route(
525 name='repo_commits_file',
525 name='repo_commits_file',
526 pattern='/{repo_name:.*?[^/]}/commits/{commit_id}/{f_path:.*}', repo_route=True)
526 pattern='/{repo_name:.*?[^/]}/commits/{commit_id}/{f_path:.*}', repo_route=True)
527 config.add_view(
527 config.add_view(
528 RepoChangelogView,
528 RepoChangelogView,
529 attr='repo_changelog',
529 attr='repo_changelog',
530 route_name='repo_commits_file', request_method='GET',
530 route_name='repo_commits_file', request_method='GET',
531 renderer='rhodecode:templates/commits/changelog.mako')
531 renderer='rhodecode:templates/commits/changelog.mako')
532 # old routes for backward compat
532 # old routes for backward compat
533 config.add_view(
533 config.add_view(
534 RepoChangelogView,
534 RepoChangelogView,
535 attr='repo_changelog',
535 attr='repo_changelog',
536 route_name='repo_changelog_file', request_method='GET',
536 route_name='repo_changelog_file', request_method='GET',
537 renderer='rhodecode:templates/commits/changelog.mako')
537 renderer='rhodecode:templates/commits/changelog.mako')
538
538
539 # Changelog (old deprecated name for commits page)
539 # Changelog (old deprecated name for commits page)
540 config.add_route(
540 config.add_route(
541 name='repo_changelog',
541 name='repo_changelog',
542 pattern='/{repo_name:.*?[^/]}/changelog', repo_route=True)
542 pattern='/{repo_name:.*?[^/]}/changelog', repo_route=True)
543 config.add_route(
543 config.add_route(
544 name='repo_changelog_file',
544 name='repo_changelog_file',
545 pattern='/{repo_name:.*?[^/]}/changelog/{commit_id}/{f_path:.*}', repo_route=True)
545 pattern='/{repo_name:.*?[^/]}/changelog/{commit_id}/{f_path:.*}', repo_route=True)
546
546
547 # Compare
547 # Compare
548 config.add_route(
548 config.add_route(
549 name='repo_compare_select',
549 name='repo_compare_select',
550 pattern='/{repo_name:.*?[^/]}/compare', repo_route=True)
550 pattern='/{repo_name:.*?[^/]}/compare', repo_route=True)
551 config.add_view(
551 config.add_view(
552 RepoCompareView,
552 RepoCompareView,
553 attr='compare_select',
553 attr='compare_select',
554 route_name='repo_compare_select', request_method='GET',
554 route_name='repo_compare_select', request_method='GET',
555 renderer='rhodecode:templates/compare/compare_diff.mako')
555 renderer='rhodecode:templates/compare/compare_diff.mako')
556
556
557 config.add_route(
557 config.add_route(
558 name='repo_compare',
558 name='repo_compare',
559 pattern='/{repo_name:.*?[^/]}/compare/{source_ref_type}@{source_ref:.*?}...{target_ref_type}@{target_ref:.*?}', repo_route=True)
559 pattern='/{repo_name:.*?[^/]}/compare/{source_ref_type}@{source_ref:.*?}...{target_ref_type}@{target_ref:.*?}', repo_route=True)
560 config.add_view(
560 config.add_view(
561 RepoCompareView,
561 RepoCompareView,
562 attr='compare',
562 attr='compare',
563 route_name='repo_compare', request_method='GET',
563 route_name='repo_compare', request_method='GET',
564 renderer=None)
564 renderer=None)
565
565
566 # Tags
566 # Tags
567 config.add_route(
567 config.add_route(
568 name='tags_home',
568 name='tags_home',
569 pattern='/{repo_name:.*?[^/]}/tags', repo_route=True)
569 pattern='/{repo_name:.*?[^/]}/tags', repo_route=True)
570 config.add_view(
570 config.add_view(
571 RepoTagsView,
571 RepoTagsView,
572 attr='tags',
572 attr='tags',
573 route_name='tags_home', request_method='GET',
573 route_name='tags_home', request_method='GET',
574 renderer='rhodecode:templates/tags/tags.mako')
574 renderer='rhodecode:templates/tags/tags.mako')
575
575
576 # Branches
576 # Branches
577 config.add_route(
577 config.add_route(
578 name='branches_home',
578 name='branches_home',
579 pattern='/{repo_name:.*?[^/]}/branches', repo_route=True)
579 pattern='/{repo_name:.*?[^/]}/branches', repo_route=True)
580 config.add_view(
580 config.add_view(
581 RepoBranchesView,
581 RepoBranchesView,
582 attr='branches',
582 attr='branches',
583 route_name='branches_home', request_method='GET',
583 route_name='branches_home', request_method='GET',
584 renderer='rhodecode:templates/branches/branches.mako')
584 renderer='rhodecode:templates/branches/branches.mako')
585
585
586 # Bookmarks
586 # Bookmarks
587 config.add_route(
587 config.add_route(
588 name='bookmarks_home',
588 name='bookmarks_home',
589 pattern='/{repo_name:.*?[^/]}/bookmarks', repo_route=True)
589 pattern='/{repo_name:.*?[^/]}/bookmarks', repo_route=True)
590 config.add_view(
590 config.add_view(
591 RepoBookmarksView,
591 RepoBookmarksView,
592 attr='bookmarks',
592 attr='bookmarks',
593 route_name='bookmarks_home', request_method='GET',
593 route_name='bookmarks_home', request_method='GET',
594 renderer='rhodecode:templates/bookmarks/bookmarks.mako')
594 renderer='rhodecode:templates/bookmarks/bookmarks.mako')
595
595
596 # Forks
596 # Forks
597 config.add_route(
597 config.add_route(
598 name='repo_fork_new',
598 name='repo_fork_new',
599 pattern='/{repo_name:.*?[^/]}/fork', repo_route=True,
599 pattern='/{repo_name:.*?[^/]}/fork', repo_route=True,
600 repo_forbid_when_archived=True,
600 repo_forbid_when_archived=True,
601 repo_accepted_types=['hg', 'git'])
601 repo_accepted_types=['hg', 'git'])
602 config.add_view(
602 config.add_view(
603 RepoForksView,
603 RepoForksView,
604 attr='repo_fork_new',
604 attr='repo_fork_new',
605 route_name='repo_fork_new', request_method='GET',
605 route_name='repo_fork_new', request_method='GET',
606 renderer='rhodecode:templates/forks/forks.mako')
606 renderer='rhodecode:templates/forks/forks.mako')
607
607
608 config.add_route(
608 config.add_route(
609 name='repo_fork_create',
609 name='repo_fork_create',
610 pattern='/{repo_name:.*?[^/]}/fork/create', repo_route=True,
610 pattern='/{repo_name:.*?[^/]}/fork/create', repo_route=True,
611 repo_forbid_when_archived=True,
611 repo_forbid_when_archived=True,
612 repo_accepted_types=['hg', 'git'])
612 repo_accepted_types=['hg', 'git'])
613 config.add_view(
613 config.add_view(
614 RepoForksView,
614 RepoForksView,
615 attr='repo_fork_create',
615 attr='repo_fork_create',
616 route_name='repo_fork_create', request_method='POST',
616 route_name='repo_fork_create', request_method='POST',
617 renderer='rhodecode:templates/forks/fork.mako')
617 renderer='rhodecode:templates/forks/fork.mako')
618
618
619 config.add_route(
619 config.add_route(
620 name='repo_forks_show_all',
620 name='repo_forks_show_all',
621 pattern='/{repo_name:.*?[^/]}/forks', repo_route=True,
621 pattern='/{repo_name:.*?[^/]}/forks', repo_route=True,
622 repo_accepted_types=['hg', 'git'])
622 repo_accepted_types=['hg', 'git'])
623 config.add_view(
623 config.add_view(
624 RepoForksView,
624 RepoForksView,
625 attr='repo_forks_show_all',
625 attr='repo_forks_show_all',
626 route_name='repo_forks_show_all', request_method='GET',
626 route_name='repo_forks_show_all', request_method='GET',
627 renderer='rhodecode:templates/forks/forks.mako')
627 renderer='rhodecode:templates/forks/forks.mako')
628
628
629 config.add_route(
629 config.add_route(
630 name='repo_forks_data',
630 name='repo_forks_data',
631 pattern='/{repo_name:.*?[^/]}/forks/data', repo_route=True,
631 pattern='/{repo_name:.*?[^/]}/forks/data', repo_route=True,
632 repo_accepted_types=['hg', 'git'])
632 repo_accepted_types=['hg', 'git'])
633 config.add_view(
633 config.add_view(
634 RepoForksView,
634 RepoForksView,
635 attr='repo_forks_data',
635 attr='repo_forks_data',
636 route_name='repo_forks_data', request_method='GET',
636 route_name='repo_forks_data', request_method='GET',
637 renderer='json_ext', xhr=True)
637 renderer='json_ext', xhr=True)
638
638
639 # Pull Requests
639 # Pull Requests
640 config.add_route(
640 config.add_route(
641 name='pullrequest_show',
641 name='pullrequest_show',
642 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}',
642 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}',
643 repo_route=True)
643 repo_route=True)
644 config.add_view(
644 config.add_view(
645 RepoPullRequestsView,
645 RepoPullRequestsView,
646 attr='pull_request_show',
646 attr='pull_request_show',
647 route_name='pullrequest_show', request_method='GET',
647 route_name='pullrequest_show', request_method='GET',
648 renderer='rhodecode:templates/pullrequests/pullrequest_show.mako')
648 renderer='rhodecode:templates/pullrequests/pullrequest_show.mako')
649
649
650 config.add_route(
650 config.add_route(
651 name='pullrequest_show_all',
651 name='pullrequest_show_all',
652 pattern='/{repo_name:.*?[^/]}/pull-request',
652 pattern='/{repo_name:.*?[^/]}/pull-request',
653 repo_route=True, repo_accepted_types=['hg', 'git'])
653 repo_route=True, repo_accepted_types=['hg', 'git'])
654 config.add_view(
654 config.add_view(
655 RepoPullRequestsView,
655 RepoPullRequestsView,
656 attr='pull_request_list',
656 attr='pull_request_list',
657 route_name='pullrequest_show_all', request_method='GET',
657 route_name='pullrequest_show_all', request_method='GET',
658 renderer='rhodecode:templates/pullrequests/pullrequests.mako')
658 renderer='rhodecode:templates/pullrequests/pullrequests.mako')
659
659
660 config.add_route(
660 config.add_route(
661 name='pullrequest_show_all_data',
661 name='pullrequest_show_all_data',
662 pattern='/{repo_name:.*?[^/]}/pull-request-data',
662 pattern='/{repo_name:.*?[^/]}/pull-request-data',
663 repo_route=True, repo_accepted_types=['hg', 'git'])
663 repo_route=True, repo_accepted_types=['hg', 'git'])
664 config.add_view(
664 config.add_view(
665 RepoPullRequestsView,
665 RepoPullRequestsView,
666 attr='pull_request_list_data',
666 attr='pull_request_list_data',
667 route_name='pullrequest_show_all_data', request_method='GET',
667 route_name='pullrequest_show_all_data', request_method='GET',
668 renderer='json_ext', xhr=True)
668 renderer='json_ext', xhr=True)
669
669
670 config.add_route(
670 config.add_route(
671 name='pullrequest_repo_refs',
671 name='pullrequest_repo_refs',
672 pattern='/{repo_name:.*?[^/]}/pull-request/refs/{target_repo_name:.*?[^/]}',
672 pattern='/{repo_name:.*?[^/]}/pull-request/refs/{target_repo_name:.*?[^/]}',
673 repo_route=True)
673 repo_route=True)
674 config.add_view(
674 config.add_view(
675 RepoPullRequestsView,
675 RepoPullRequestsView,
676 attr='pull_request_repo_refs',
676 attr='pull_request_repo_refs',
677 route_name='pullrequest_repo_refs', request_method='GET',
677 route_name='pullrequest_repo_refs', request_method='GET',
678 renderer='json_ext', xhr=True)
678 renderer='json_ext', xhr=True)
679
679
680 config.add_route(
680 config.add_route(
681 name='pullrequest_repo_targets',
681 name='pullrequest_repo_targets',
682 pattern='/{repo_name:.*?[^/]}/pull-request/repo-targets',
682 pattern='/{repo_name:.*?[^/]}/pull-request/repo-targets',
683 repo_route=True)
683 repo_route=True)
684 config.add_view(
684 config.add_view(
685 RepoPullRequestsView,
685 RepoPullRequestsView,
686 attr='pullrequest_repo_targets',
686 attr='pullrequest_repo_targets',
687 route_name='pullrequest_repo_targets', request_method='GET',
687 route_name='pullrequest_repo_targets', request_method='GET',
688 renderer='json_ext', xhr=True)
688 renderer='json_ext', xhr=True)
689
689
690 config.add_route(
690 config.add_route(
691 name='pullrequest_new',
691 name='pullrequest_new',
692 pattern='/{repo_name:.*?[^/]}/pull-request/new',
692 pattern='/{repo_name:.*?[^/]}/pull-request/new',
693 repo_route=True, repo_accepted_types=['hg', 'git'],
693 repo_route=True, repo_accepted_types=['hg', 'git'],
694 repo_forbid_when_archived=True)
694 repo_forbid_when_archived=True)
695 config.add_view(
695 config.add_view(
696 RepoPullRequestsView,
696 RepoPullRequestsView,
697 attr='pull_request_new',
697 attr='pull_request_new',
698 route_name='pullrequest_new', request_method='GET',
698 route_name='pullrequest_new', request_method='GET',
699 renderer='rhodecode:templates/pullrequests/pullrequest.mako')
699 renderer='rhodecode:templates/pullrequests/pullrequest.mako')
700
700
701 config.add_route(
701 config.add_route(
702 name='pullrequest_create',
702 name='pullrequest_create',
703 pattern='/{repo_name:.*?[^/]}/pull-request/create',
703 pattern='/{repo_name:.*?[^/]}/pull-request/create',
704 repo_route=True, repo_accepted_types=['hg', 'git'],
704 repo_route=True, repo_accepted_types=['hg', 'git'],
705 repo_forbid_when_archived=True)
705 repo_forbid_when_archived=True)
706 config.add_view(
706 config.add_view(
707 RepoPullRequestsView,
707 RepoPullRequestsView,
708 attr='pull_request_create',
708 attr='pull_request_create',
709 route_name='pullrequest_create', request_method='POST',
709 route_name='pullrequest_create', request_method='POST',
710 renderer=None)
710 renderer=None)
711
711
712 config.add_route(
712 config.add_route(
713 name='pullrequest_update',
713 name='pullrequest_update',
714 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/update',
714 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/update',
715 repo_route=True, repo_forbid_when_archived=True)
715 repo_route=True, repo_forbid_when_archived=True)
716 config.add_view(
716 config.add_view(
717 RepoPullRequestsView,
717 RepoPullRequestsView,
718 attr='pull_request_update',
718 attr='pull_request_update',
719 route_name='pullrequest_update', request_method='POST',
719 route_name='pullrequest_update', request_method='POST',
720 renderer='json_ext')
720 renderer='json_ext')
721
721
722 config.add_route(
722 config.add_route(
723 name='pullrequest_merge',
723 name='pullrequest_merge',
724 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/merge',
724 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/merge',
725 repo_route=True, repo_forbid_when_archived=True)
725 repo_route=True, repo_forbid_when_archived=True)
726 config.add_view(
726 config.add_view(
727 RepoPullRequestsView,
727 RepoPullRequestsView,
728 attr='pull_request_merge',
728 attr='pull_request_merge',
729 route_name='pullrequest_merge', request_method='POST',
729 route_name='pullrequest_merge', request_method='POST',
730 renderer='json_ext')
730 renderer='json_ext')
731
731
732 config.add_route(
732 config.add_route(
733 name='pullrequest_delete',
733 name='pullrequest_delete',
734 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/delete',
734 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/delete',
735 repo_route=True, repo_forbid_when_archived=True)
735 repo_route=True, repo_forbid_when_archived=True)
736 config.add_view(
736 config.add_view(
737 RepoPullRequestsView,
737 RepoPullRequestsView,
738 attr='pull_request_delete',
738 attr='pull_request_delete',
739 route_name='pullrequest_delete', request_method='POST',
739 route_name='pullrequest_delete', request_method='POST',
740 renderer='json_ext')
740 renderer='json_ext')
741
741
742 config.add_route(
742 config.add_route(
743 name='pullrequest_comment_create',
743 name='pullrequest_comment_create',
744 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment',
744 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment',
745 repo_route=True)
745 repo_route=True)
746 config.add_view(
746 config.add_view(
747 RepoPullRequestsView,
747 RepoPullRequestsView,
748 attr='pull_request_comment_create',
748 attr='pull_request_comment_create',
749 route_name='pullrequest_comment_create', request_method='POST',
749 route_name='pullrequest_comment_create', request_method='POST',
750 renderer='json_ext')
750 renderer='json_ext')
751
751
752 config.add_route(
752 config.add_route(
753 name='pullrequest_comment_edit',
753 name='pullrequest_comment_edit',
754 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment/{comment_id}/edit',
754 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment/{comment_id}/edit',
755 repo_route=True, repo_accepted_types=['hg', 'git'])
755 repo_route=True, repo_accepted_types=['hg', 'git'])
756 config.add_view(
756 config.add_view(
757 RepoPullRequestsView,
757 RepoPullRequestsView,
758 attr='pull_request_comment_edit',
758 attr='pull_request_comment_edit',
759 route_name='pullrequest_comment_edit', request_method='POST',
759 route_name='pullrequest_comment_edit', request_method='POST',
760 renderer='json_ext')
760 renderer='json_ext')
761
761
762 config.add_route(
762 config.add_route(
763 name='pullrequest_comment_delete',
763 name='pullrequest_comment_delete',
764 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment/{comment_id}/delete',
764 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment/{comment_id}/delete',
765 repo_route=True, repo_accepted_types=['hg', 'git'])
765 repo_route=True, repo_accepted_types=['hg', 'git'])
766 config.add_view(
766 config.add_view(
767 RepoPullRequestsView,
767 RepoPullRequestsView,
768 attr='pull_request_comment_delete',
768 attr='pull_request_comment_delete',
769 route_name='pullrequest_comment_delete', request_method='POST',
769 route_name='pullrequest_comment_delete', request_method='POST',
770 renderer='json_ext')
770 renderer='json_ext')
771
771
772 config.add_route(
772 config.add_route(
773 name='pullrequest_comments',
773 name='pullrequest_comments',
774 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comments',
774 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comments',
775 repo_route=True)
775 repo_route=True)
776 config.add_view(
776 config.add_view(
777 RepoPullRequestsView,
777 RepoPullRequestsView,
778 attr='pullrequest_comments',
778 attr='pullrequest_comments',
779 route_name='pullrequest_comments', request_method='POST',
779 route_name='pullrequest_comments', request_method='POST',
780 renderer='string_html', xhr=True)
780 renderer='string_html', xhr=True)
781
781
782 config.add_route(
782 config.add_route(
783 name='pullrequest_todos',
783 name='pullrequest_todos',
784 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/todos',
784 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/todos',
785 repo_route=True)
785 repo_route=True)
786 config.add_view(
786 config.add_view(
787 RepoPullRequestsView,
787 RepoPullRequestsView,
788 attr='pullrequest_todos',
788 attr='pullrequest_todos',
789 route_name='pullrequest_todos', request_method='POST',
789 route_name='pullrequest_todos', request_method='POST',
790 renderer='string_html', xhr=True)
790 renderer='string_html', xhr=True)
791
791
792 config.add_route(
792 config.add_route(
793 name='pullrequest_drafts',
793 name='pullrequest_drafts',
794 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/drafts',
794 pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/drafts',
795 repo_route=True)
795 repo_route=True)
796 config.add_view(
796 config.add_view(
797 RepoPullRequestsView,
797 RepoPullRequestsView,
798 attr='pullrequest_drafts',
798 attr='pullrequest_drafts',
799 route_name='pullrequest_drafts', request_method='POST',
799 route_name='pullrequest_drafts', request_method='POST',
800 renderer='string_html', xhr=True)
800 renderer='string_html', xhr=True)
801
801
802 # Artifacts, (EE feature)
802 # Artifacts, (EE feature)
803 config.add_route(
803 config.add_route(
804 name='repo_artifacts_list',
804 name='repo_artifacts_list',
805 pattern='/{repo_name:.*?[^/]}/artifacts', repo_route=True)
805 pattern='/{repo_name:.*?[^/]}/artifacts', repo_route=True)
806 config.add_view(
806 config.add_view(
807 RepoArtifactsView,
807 RepoArtifactsView,
808 attr='repo_artifacts',
808 attr='repo_artifacts',
809 route_name='repo_artifacts_list', request_method='GET',
809 route_name='repo_artifacts_list', request_method='GET',
810 renderer='rhodecode:templates/artifacts/artifact_list.mako')
810 renderer='rhodecode:templates/artifacts/artifact_list.mako')
811
811
812 # Settings
812 # Settings
813 config.add_route(
813 config.add_route(
814 name='edit_repo',
814 name='edit_repo',
815 pattern='/{repo_name:.*?[^/]}/settings', repo_route=True)
815 pattern='/{repo_name:.*?[^/]}/settings', repo_route=True)
816 config.add_view(
816 config.add_view(
817 RepoSettingsView,
817 RepoSettingsView,
818 attr='edit_settings',
818 attr='edit_settings',
819 route_name='edit_repo', request_method='GET',
819 route_name='edit_repo', request_method='GET',
820 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
820 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
821 # update is POST on edit_repo
821 # update is POST on edit_repo
822 config.add_view(
822 config.add_view(
823 RepoSettingsView,
823 RepoSettingsView,
824 attr='edit_settings_update',
824 attr='edit_settings_update',
825 route_name='edit_repo', request_method='POST',
825 route_name='edit_repo', request_method='POST',
826 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
826 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
827
827
828 # Settings advanced
828 # Settings advanced
829 config.add_route(
829 config.add_route(
830 name='edit_repo_advanced',
830 name='edit_repo_advanced',
831 pattern='/{repo_name:.*?[^/]}/settings/advanced', repo_route=True)
831 pattern='/{repo_name:.*?[^/]}/settings/advanced', repo_route=True)
832 config.add_view(
832 config.add_view(
833 RepoSettingsAdvancedView,
833 RepoSettingsAdvancedView,
834 attr='edit_advanced',
834 attr='edit_advanced',
835 route_name='edit_repo_advanced', request_method='GET',
835 route_name='edit_repo_advanced', request_method='GET',
836 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
836 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
837
837
838 config.add_route(
838 config.add_route(
839 name='edit_repo_advanced_archive',
839 name='edit_repo_advanced_archive',
840 pattern='/{repo_name:.*?[^/]}/settings/advanced/archive', repo_route=True)
840 pattern='/{repo_name:.*?[^/]}/settings/advanced/archive', repo_route=True)
841 config.add_view(
841 config.add_view(
842 RepoSettingsAdvancedView,
842 RepoSettingsAdvancedView,
843 attr='edit_advanced_archive',
843 attr='edit_advanced_archive',
844 route_name='edit_repo_advanced_archive', request_method='POST',
844 route_name='edit_repo_advanced_archive', request_method='POST',
845 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
845 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
846
846
847 config.add_route(
847 config.add_route(
848 name='edit_repo_advanced_delete',
848 name='edit_repo_advanced_delete',
849 pattern='/{repo_name:.*?[^/]}/settings/advanced/delete', repo_route=True)
849 pattern='/{repo_name:.*?[^/]}/settings/advanced/delete', repo_route=True)
850 config.add_view(
850 config.add_view(
851 RepoSettingsAdvancedView,
851 RepoSettingsAdvancedView,
852 attr='edit_advanced_delete',
852 attr='edit_advanced_delete',
853 route_name='edit_repo_advanced_delete', request_method='POST',
853 route_name='edit_repo_advanced_delete', request_method='POST',
854 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
854 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
855
855
856 config.add_route(
856 config.add_route(
857 name='edit_repo_advanced_locking',
857 name='edit_repo_advanced_locking',
858 pattern='/{repo_name:.*?[^/]}/settings/advanced/locking', repo_route=True)
858 pattern='/{repo_name:.*?[^/]}/settings/advanced/locking', repo_route=True)
859 config.add_view(
859 config.add_view(
860 RepoSettingsAdvancedView,
860 RepoSettingsAdvancedView,
861 attr='edit_advanced_toggle_locking',
861 attr='edit_advanced_toggle_locking',
862 route_name='edit_repo_advanced_locking', request_method='POST',
862 route_name='edit_repo_advanced_locking', request_method='POST',
863 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
863 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
864
864
865 config.add_route(
865 config.add_route(
866 name='edit_repo_advanced_journal',
866 name='edit_repo_advanced_journal',
867 pattern='/{repo_name:.*?[^/]}/settings/advanced/journal', repo_route=True)
867 pattern='/{repo_name:.*?[^/]}/settings/advanced/journal', repo_route=True)
868 config.add_view(
868 config.add_view(
869 RepoSettingsAdvancedView,
869 RepoSettingsAdvancedView,
870 attr='edit_advanced_journal',
870 attr='edit_advanced_journal',
871 route_name='edit_repo_advanced_journal', request_method='POST',
871 route_name='edit_repo_advanced_journal', request_method='POST',
872 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
872 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
873
873
874 config.add_route(
874 config.add_route(
875 name='edit_repo_advanced_fork',
875 name='edit_repo_advanced_fork',
876 pattern='/{repo_name:.*?[^/]}/settings/advanced/fork', repo_route=True)
876 pattern='/{repo_name:.*?[^/]}/settings/advanced/fork', repo_route=True)
877 config.add_view(
877 config.add_view(
878 RepoSettingsAdvancedView,
878 RepoSettingsAdvancedView,
879 attr='edit_advanced_fork',
879 attr='edit_advanced_fork',
880 route_name='edit_repo_advanced_fork', request_method='POST',
880 route_name='edit_repo_advanced_fork', request_method='POST',
881 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
881 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
882
882
883 config.add_route(
883 config.add_route(
884 name='edit_repo_advanced_hooks',
884 name='edit_repo_advanced_hooks',
885 pattern='/{repo_name:.*?[^/]}/settings/advanced/hooks', repo_route=True)
885 pattern='/{repo_name:.*?[^/]}/settings/advanced/hooks', repo_route=True)
886 config.add_view(
886 config.add_view(
887 RepoSettingsAdvancedView,
887 RepoSettingsAdvancedView,
888 attr='edit_advanced_install_hooks',
888 attr='edit_advanced_install_hooks',
889 route_name='edit_repo_advanced_hooks', request_method='GET',
889 route_name='edit_repo_advanced_hooks', request_method='GET',
890 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
890 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
891
891
892 # Caches
892 # Caches
893 config.add_route(
893 config.add_route(
894 name='edit_repo_caches',
894 name='edit_repo_caches',
895 pattern='/{repo_name:.*?[^/]}/settings/caches', repo_route=True)
895 pattern='/{repo_name:.*?[^/]}/settings/caches', repo_route=True)
896 config.add_view(
896 config.add_view(
897 RepoCachesView,
897 RepoCachesView,
898 attr='repo_caches',
898 attr='repo_caches',
899 route_name='edit_repo_caches', request_method='GET',
899 route_name='edit_repo_caches', request_method='GET',
900 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
900 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
901 config.add_view(
901 config.add_view(
902 RepoCachesView,
902 RepoCachesView,
903 attr='repo_caches_purge',
903 attr='repo_caches_purge',
904 route_name='edit_repo_caches', request_method='POST')
904 route_name='edit_repo_caches', request_method='POST')
905
905
906 # Permissions
906 # Permissions
907 config.add_route(
907 config.add_route(
908 name='edit_repo_perms',
908 name='edit_repo_perms',
909 pattern='/{repo_name:.*?[^/]}/settings/permissions', repo_route=True)
909 pattern='/{repo_name:.*?[^/]}/settings/permissions', repo_route=True)
910 config.add_view(
910 config.add_view(
911 RepoSettingsPermissionsView,
911 RepoSettingsPermissionsView,
912 attr='edit_permissions',
912 attr='edit_permissions',
913 route_name='edit_repo_perms', request_method='GET',
913 route_name='edit_repo_perms', request_method='GET',
914 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
914 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
915 config.add_view(
915 config.add_view(
916 RepoSettingsPermissionsView,
916 RepoSettingsPermissionsView,
917 attr='edit_permissions_update',
917 attr='edit_permissions_update',
918 route_name='edit_repo_perms', request_method='POST',
918 route_name='edit_repo_perms', request_method='POST',
919 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
919 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
920
920
921 config.add_route(
921 config.add_route(
922 name='edit_repo_perms_set_private',
922 name='edit_repo_perms_set_private',
923 pattern='/{repo_name:.*?[^/]}/settings/permissions/set_private', repo_route=True)
923 pattern='/{repo_name:.*?[^/]}/settings/permissions/set_private', repo_route=True)
924 config.add_view(
924 config.add_view(
925 RepoSettingsPermissionsView,
925 RepoSettingsPermissionsView,
926 attr='edit_permissions_set_private_repo',
926 attr='edit_permissions_set_private_repo',
927 route_name='edit_repo_perms_set_private', request_method='POST',
927 route_name='edit_repo_perms_set_private', request_method='POST',
928 renderer='json_ext')
928 renderer='json_ext')
929
929
930 # Permissions Branch (EE feature)
930 # Permissions Branch (EE feature)
931 config.add_route(
931 config.add_route(
932 name='edit_repo_perms_branch',
932 name='edit_repo_perms_branch',
933 pattern='/{repo_name:.*?[^/]}/settings/branch_permissions', repo_route=True)
933 pattern='/{repo_name:.*?[^/]}/settings/branch_permissions', repo_route=True)
934 config.add_view(
934 config.add_view(
935 RepoBranchesView,
935 RepoSettingsBranchPermissionsView,
936 attr='branches',
936 attr='branch_permissions',
937 route_name='edit_repo_perms_branch', request_method='GET',
937 route_name='edit_repo_perms_branch', request_method='GET',
938 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
938 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
939
939
940 config.add_route(
940 config.add_route(
941 name='edit_repo_perms_branch_delete',
941 name='edit_repo_perms_branch_delete',
942 pattern='/{repo_name:.*?[^/]}/settings/branch_permissions/{rule_id}/delete',
942 pattern='/{repo_name:.*?[^/]}/settings/branch_permissions/{rule_id}/delete',
943 repo_route=True)
943 repo_route=True)
944 ## Only implemented in EE
944 ## Only implemented in EE
945
945
946 # Maintenance
946 # Maintenance
947 config.add_route(
947 config.add_route(
948 name='edit_repo_maintenance',
948 name='edit_repo_maintenance',
949 pattern='/{repo_name:.*?[^/]}/settings/maintenance', repo_route=True)
949 pattern='/{repo_name:.*?[^/]}/settings/maintenance', repo_route=True)
950 config.add_view(
950 config.add_view(
951 RepoMaintenanceView,
951 RepoMaintenanceView,
952 attr='repo_maintenance',
952 attr='repo_maintenance',
953 route_name='edit_repo_maintenance', request_method='GET',
953 route_name='edit_repo_maintenance', request_method='GET',
954 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
954 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
955
955
956 config.add_route(
956 config.add_route(
957 name='edit_repo_maintenance_execute',
957 name='edit_repo_maintenance_execute',
958 pattern='/{repo_name:.*?[^/]}/settings/maintenance/execute', repo_route=True)
958 pattern='/{repo_name:.*?[^/]}/settings/maintenance/execute', repo_route=True)
959 config.add_view(
959 config.add_view(
960 RepoMaintenanceView,
960 RepoMaintenanceView,
961 attr='repo_maintenance_execute',
961 attr='repo_maintenance_execute',
962 route_name='edit_repo_maintenance_execute', request_method='GET',
962 route_name='edit_repo_maintenance_execute', request_method='GET',
963 renderer='json', xhr=True)
963 renderer='json', xhr=True)
964
964
965 # Fields
965 # Fields
966 config.add_route(
966 config.add_route(
967 name='edit_repo_fields',
967 name='edit_repo_fields',
968 pattern='/{repo_name:.*?[^/]}/settings/fields', repo_route=True)
968 pattern='/{repo_name:.*?[^/]}/settings/fields', repo_route=True)
969 config.add_view(
969 config.add_view(
970 RepoSettingsFieldsView,
970 RepoSettingsFieldsView,
971 attr='repo_field_edit',
971 attr='repo_field_edit',
972 route_name='edit_repo_fields', request_method='GET',
972 route_name='edit_repo_fields', request_method='GET',
973 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
973 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
974
974
975 config.add_route(
975 config.add_route(
976 name='edit_repo_fields_create',
976 name='edit_repo_fields_create',
977 pattern='/{repo_name:.*?[^/]}/settings/fields/create', repo_route=True)
977 pattern='/{repo_name:.*?[^/]}/settings/fields/create', repo_route=True)
978 config.add_view(
978 config.add_view(
979 RepoSettingsFieldsView,
979 RepoSettingsFieldsView,
980 attr='repo_field_create',
980 attr='repo_field_create',
981 route_name='edit_repo_fields_create', request_method='POST',
981 route_name='edit_repo_fields_create', request_method='POST',
982 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
982 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
983
983
984 config.add_route(
984 config.add_route(
985 name='edit_repo_fields_delete',
985 name='edit_repo_fields_delete',
986 pattern='/{repo_name:.*?[^/]}/settings/fields/{field_id}/delete', repo_route=True)
986 pattern='/{repo_name:.*?[^/]}/settings/fields/{field_id}/delete', repo_route=True)
987 config.add_view(
987 config.add_view(
988 RepoSettingsFieldsView,
988 RepoSettingsFieldsView,
989 attr='repo_field_delete',
989 attr='repo_field_delete',
990 route_name='edit_repo_fields_delete', request_method='POST',
990 route_name='edit_repo_fields_delete', request_method='POST',
991 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
991 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
992
992
993 # Locking
993 # Locking
994 config.add_route(
994 config.add_route(
995 name='repo_edit_toggle_locking',
995 name='repo_edit_toggle_locking',
996 pattern='/{repo_name:.*?[^/]}/settings/toggle_locking', repo_route=True)
996 pattern='/{repo_name:.*?[^/]}/settings/toggle_locking', repo_route=True)
997 config.add_view(
997 config.add_view(
998 RepoSettingsView,
998 RepoSettingsView,
999 attr='edit_advanced_toggle_locking',
999 attr='edit_advanced_toggle_locking',
1000 route_name='repo_edit_toggle_locking', request_method='GET',
1000 route_name='repo_edit_toggle_locking', request_method='GET',
1001 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1001 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1002
1002
1003 # Remote
1003 # Remote
1004 config.add_route(
1004 config.add_route(
1005 name='edit_repo_remote',
1005 name='edit_repo_remote',
1006 pattern='/{repo_name:.*?[^/]}/settings/remote', repo_route=True)
1006 pattern='/{repo_name:.*?[^/]}/settings/remote', repo_route=True)
1007 config.add_view(
1007 config.add_view(
1008 RepoSettingsRemoteView,
1008 RepoSettingsRemoteView,
1009 attr='repo_remote_edit_form',
1009 attr='repo_remote_edit_form',
1010 route_name='edit_repo_remote', request_method='GET',
1010 route_name='edit_repo_remote', request_method='GET',
1011 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1011 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1012
1012
1013 config.add_route(
1013 config.add_route(
1014 name='edit_repo_remote_pull',
1014 name='edit_repo_remote_pull',
1015 pattern='/{repo_name:.*?[^/]}/settings/remote/pull', repo_route=True)
1015 pattern='/{repo_name:.*?[^/]}/settings/remote/pull', repo_route=True)
1016 config.add_view(
1016 config.add_view(
1017 RepoSettingsRemoteView,
1017 RepoSettingsRemoteView,
1018 attr='repo_remote_pull_changes',
1018 attr='repo_remote_pull_changes',
1019 route_name='edit_repo_remote_pull', request_method='POST',
1019 route_name='edit_repo_remote_pull', request_method='POST',
1020 renderer=None)
1020 renderer=None)
1021
1021
1022 config.add_route(
1022 config.add_route(
1023 name='edit_repo_remote_push',
1023 name='edit_repo_remote_push',
1024 pattern='/{repo_name:.*?[^/]}/settings/remote/push', repo_route=True)
1024 pattern='/{repo_name:.*?[^/]}/settings/remote/push', repo_route=True)
1025
1025
1026 # Statistics
1026 # Statistics
1027 config.add_route(
1027 config.add_route(
1028 name='edit_repo_statistics',
1028 name='edit_repo_statistics',
1029 pattern='/{repo_name:.*?[^/]}/settings/statistics', repo_route=True)
1029 pattern='/{repo_name:.*?[^/]}/settings/statistics', repo_route=True)
1030 config.add_view(
1030 config.add_view(
1031 RepoSettingsView,
1031 RepoSettingsView,
1032 attr='edit_statistics_form',
1032 attr='edit_statistics_form',
1033 route_name='edit_repo_statistics', request_method='GET',
1033 route_name='edit_repo_statistics', request_method='GET',
1034 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1034 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1035
1035
1036 config.add_route(
1036 config.add_route(
1037 name='edit_repo_statistics_reset',
1037 name='edit_repo_statistics_reset',
1038 pattern='/{repo_name:.*?[^/]}/settings/statistics/update', repo_route=True)
1038 pattern='/{repo_name:.*?[^/]}/settings/statistics/update', repo_route=True)
1039 config.add_view(
1039 config.add_view(
1040 RepoSettingsView,
1040 RepoSettingsView,
1041 attr='repo_statistics_reset',
1041 attr='repo_statistics_reset',
1042 route_name='edit_repo_statistics_reset', request_method='POST',
1042 route_name='edit_repo_statistics_reset', request_method='POST',
1043 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1043 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1044
1044
1045 # Issue trackers
1045 # Issue trackers
1046 config.add_route(
1046 config.add_route(
1047 name='edit_repo_issuetracker',
1047 name='edit_repo_issuetracker',
1048 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers', repo_route=True)
1048 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers', repo_route=True)
1049 config.add_view(
1049 config.add_view(
1050 RepoSettingsIssueTrackersView,
1050 RepoSettingsIssueTrackersView,
1051 attr='repo_issuetracker',
1051 attr='repo_issuetracker',
1052 route_name='edit_repo_issuetracker', request_method='GET',
1052 route_name='edit_repo_issuetracker', request_method='GET',
1053 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1053 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1054
1054
1055 config.add_route(
1055 config.add_route(
1056 name='edit_repo_issuetracker_test',
1056 name='edit_repo_issuetracker_test',
1057 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers/test', repo_route=True)
1057 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers/test', repo_route=True)
1058 config.add_view(
1058 config.add_view(
1059 RepoSettingsIssueTrackersView,
1059 RepoSettingsIssueTrackersView,
1060 attr='repo_issuetracker_test',
1060 attr='repo_issuetracker_test',
1061 route_name='edit_repo_issuetracker_test', request_method='POST',
1061 route_name='edit_repo_issuetracker_test', request_method='POST',
1062 renderer='string', xhr=True)
1062 renderer='string', xhr=True)
1063
1063
1064 config.add_route(
1064 config.add_route(
1065 name='edit_repo_issuetracker_delete',
1065 name='edit_repo_issuetracker_delete',
1066 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers/delete', repo_route=True)
1066 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers/delete', repo_route=True)
1067 config.add_view(
1067 config.add_view(
1068 RepoSettingsIssueTrackersView,
1068 RepoSettingsIssueTrackersView,
1069 attr='repo_issuetracker_delete',
1069 attr='repo_issuetracker_delete',
1070 route_name='edit_repo_issuetracker_delete', request_method='POST',
1070 route_name='edit_repo_issuetracker_delete', request_method='POST',
1071 renderer='json_ext', xhr=True)
1071 renderer='json_ext', xhr=True)
1072
1072
1073 config.add_route(
1073 config.add_route(
1074 name='edit_repo_issuetracker_update',
1074 name='edit_repo_issuetracker_update',
1075 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers/update', repo_route=True)
1075 pattern='/{repo_name:.*?[^/]}/settings/issue_trackers/update', repo_route=True)
1076 config.add_view(
1076 config.add_view(
1077 RepoSettingsIssueTrackersView,
1077 RepoSettingsIssueTrackersView,
1078 attr='repo_issuetracker_update',
1078 attr='repo_issuetracker_update',
1079 route_name='edit_repo_issuetracker_update', request_method='POST',
1079 route_name='edit_repo_issuetracker_update', request_method='POST',
1080 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1080 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1081
1081
1082 # VCS Settings
1082 # VCS Settings
1083 config.add_route(
1083 config.add_route(
1084 name='edit_repo_vcs',
1084 name='edit_repo_vcs',
1085 pattern='/{repo_name:.*?[^/]}/settings/vcs', repo_route=True)
1085 pattern='/{repo_name:.*?[^/]}/settings/vcs', repo_route=True)
1086 config.add_view(
1086 config.add_view(
1087 RepoSettingsVcsView,
1087 RepoSettingsVcsView,
1088 attr='repo_vcs_settings',
1088 attr='repo_vcs_settings',
1089 route_name='edit_repo_vcs', request_method='GET',
1089 route_name='edit_repo_vcs', request_method='GET',
1090 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1090 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1091
1091
1092 config.add_route(
1092 config.add_route(
1093 name='edit_repo_vcs_update',
1093 name='edit_repo_vcs_update',
1094 pattern='/{repo_name:.*?[^/]}/settings/vcs/update', repo_route=True)
1094 pattern='/{repo_name:.*?[^/]}/settings/vcs/update', repo_route=True)
1095 config.add_view(
1095 config.add_view(
1096 RepoSettingsVcsView,
1096 RepoSettingsVcsView,
1097 attr='repo_settings_vcs_update',
1097 attr='repo_settings_vcs_update',
1098 route_name='edit_repo_vcs_update', request_method='POST',
1098 route_name='edit_repo_vcs_update', request_method='POST',
1099 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1099 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1100
1100
1101 # svn pattern
1101 # svn pattern
1102 config.add_route(
1102 config.add_route(
1103 name='edit_repo_vcs_svn_pattern_delete',
1103 name='edit_repo_vcs_svn_pattern_delete',
1104 pattern='/{repo_name:.*?[^/]}/settings/vcs/svn_pattern/delete', repo_route=True)
1104 pattern='/{repo_name:.*?[^/]}/settings/vcs/svn_pattern/delete', repo_route=True)
1105 config.add_view(
1105 config.add_view(
1106 RepoSettingsVcsView,
1106 RepoSettingsVcsView,
1107 attr='repo_settings_delete_svn_pattern',
1107 attr='repo_settings_delete_svn_pattern',
1108 route_name='edit_repo_vcs_svn_pattern_delete', request_method='POST',
1108 route_name='edit_repo_vcs_svn_pattern_delete', request_method='POST',
1109 renderer='json_ext', xhr=True)
1109 renderer='json_ext', xhr=True)
1110
1110
1111 # Repo Review Rules (EE feature)
1111 # Repo Review Rules (EE feature)
1112 config.add_route(
1112 config.add_route(
1113 name='repo_reviewers',
1113 name='repo_reviewers',
1114 pattern='/{repo_name:.*?[^/]}/settings/review/rules', repo_route=True)
1114 pattern='/{repo_name:.*?[^/]}/settings/review/rules', repo_route=True)
1115 config.add_view(
1115 config.add_view(
1116 RepoReviewRulesView,
1116 RepoReviewRulesView,
1117 attr='repo_review_rules',
1117 attr='repo_review_rules',
1118 route_name='repo_reviewers', request_method='GET',
1118 route_name='repo_reviewers', request_method='GET',
1119 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1119 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1120
1120
1121 config.add_route(
1121 config.add_route(
1122 name='repo_default_reviewers_data',
1122 name='repo_default_reviewers_data',
1123 pattern='/{repo_name:.*?[^/]}/settings/review/default-reviewers', repo_route=True)
1123 pattern='/{repo_name:.*?[^/]}/settings/review/default-reviewers', repo_route=True)
1124 config.add_view(
1124 config.add_view(
1125 RepoReviewRulesView,
1125 RepoReviewRulesView,
1126 attr='repo_default_reviewers_data',
1126 attr='repo_default_reviewers_data',
1127 route_name='repo_default_reviewers_data', request_method='GET',
1127 route_name='repo_default_reviewers_data', request_method='GET',
1128 renderer='json_ext')
1128 renderer='json_ext')
1129
1129
1130 # Repo Automation (EE feature)
1130 # Repo Automation (EE feature)
1131 config.add_route(
1131 config.add_route(
1132 name='repo_automation',
1132 name='repo_automation',
1133 pattern='/{repo_name:.*?[^/]}/settings/automation', repo_route=True)
1133 pattern='/{repo_name:.*?[^/]}/settings/automation', repo_route=True)
1134 config.add_view(
1134 config.add_view(
1135 RepoAutomationView,
1135 RepoAutomationView,
1136 attr='repo_automation',
1136 attr='repo_automation',
1137 route_name='repo_automation', request_method='GET',
1137 route_name='repo_automation', request_method='GET',
1138 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1138 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1139
1139
1140 # Strip
1140 # Strip
1141 config.add_route(
1141 config.add_route(
1142 name='edit_repo_strip',
1142 name='edit_repo_strip',
1143 pattern='/{repo_name:.*?[^/]}/settings/strip', repo_route=True)
1143 pattern='/{repo_name:.*?[^/]}/settings/strip', repo_route=True)
1144 config.add_view(
1144 config.add_view(
1145 RepoStripView,
1145 RepoStripView,
1146 attr='strip',
1146 attr='strip',
1147 route_name='edit_repo_strip', request_method='GET',
1147 route_name='edit_repo_strip', request_method='GET',
1148 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1148 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1149
1149
1150 config.add_route(
1150 config.add_route(
1151 name='strip_check',
1151 name='strip_check',
1152 pattern='/{repo_name:.*?[^/]}/settings/strip_check', repo_route=True)
1152 pattern='/{repo_name:.*?[^/]}/settings/strip_check', repo_route=True)
1153 config.add_view(
1153 config.add_view(
1154 RepoStripView,
1154 RepoStripView,
1155 attr='strip_check',
1155 attr='strip_check',
1156 route_name='strip_check', request_method='POST',
1156 route_name='strip_check', request_method='POST',
1157 renderer='json', xhr=True)
1157 renderer='json', xhr=True)
1158
1158
1159 config.add_route(
1159 config.add_route(
1160 name='strip_execute',
1160 name='strip_execute',
1161 pattern='/{repo_name:.*?[^/]}/settings/strip_execute', repo_route=True)
1161 pattern='/{repo_name:.*?[^/]}/settings/strip_execute', repo_route=True)
1162 config.add_view(
1162 config.add_view(
1163 RepoStripView,
1163 RepoStripView,
1164 attr='strip_execute',
1164 attr='strip_execute',
1165 route_name='strip_execute', request_method='POST',
1165 route_name='strip_execute', request_method='POST',
1166 renderer='json', xhr=True)
1166 renderer='json', xhr=True)
1167
1167
1168 # Audit logs
1168 # Audit logs
1169 config.add_route(
1169 config.add_route(
1170 name='edit_repo_audit_logs',
1170 name='edit_repo_audit_logs',
1171 pattern='/{repo_name:.*?[^/]}/settings/audit_logs', repo_route=True)
1171 pattern='/{repo_name:.*?[^/]}/settings/audit_logs', repo_route=True)
1172 config.add_view(
1172 config.add_view(
1173 AuditLogsView,
1173 AuditLogsView,
1174 attr='repo_audit_logs',
1174 attr='repo_audit_logs',
1175 route_name='edit_repo_audit_logs', request_method='GET',
1175 route_name='edit_repo_audit_logs', request_method='GET',
1176 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1176 renderer='rhodecode:templates/admin/repos/repo_edit.mako')
1177
1177
1178 # ATOM/RSS Feed, shouldn't contain slashes for outlook compatibility
1178 # ATOM/RSS Feed, shouldn't contain slashes for outlook compatibility
1179 config.add_route(
1179 config.add_route(
1180 name='rss_feed_home',
1180 name='rss_feed_home',
1181 pattern='/{repo_name:.*?[^/]}/feed-rss', repo_route=True)
1181 pattern='/{repo_name:.*?[^/]}/feed-rss', repo_route=True)
1182 config.add_view(
1182 config.add_view(
1183 RepoFeedView,
1183 RepoFeedView,
1184 attr='rss',
1184 attr='rss',
1185 route_name='rss_feed_home', request_method='GET', renderer=None)
1185 route_name='rss_feed_home', request_method='GET', renderer=None)
1186
1186
1187 config.add_route(
1187 config.add_route(
1188 name='rss_feed_home_old',
1188 name='rss_feed_home_old',
1189 pattern='/{repo_name:.*?[^/]}/feed/rss', repo_route=True)
1189 pattern='/{repo_name:.*?[^/]}/feed/rss', repo_route=True)
1190 config.add_view(
1190 config.add_view(
1191 RepoFeedView,
1191 RepoFeedView,
1192 attr='rss',
1192 attr='rss',
1193 route_name='rss_feed_home_old', request_method='GET', renderer=None)
1193 route_name='rss_feed_home_old', request_method='GET', renderer=None)
1194
1194
1195 config.add_route(
1195 config.add_route(
1196 name='atom_feed_home',
1196 name='atom_feed_home',
1197 pattern='/{repo_name:.*?[^/]}/feed-atom', repo_route=True)
1197 pattern='/{repo_name:.*?[^/]}/feed-atom', repo_route=True)
1198 config.add_view(
1198 config.add_view(
1199 RepoFeedView,
1199 RepoFeedView,
1200 attr='atom',
1200 attr='atom',
1201 route_name='atom_feed_home', request_method='GET', renderer=None)
1201 route_name='atom_feed_home', request_method='GET', renderer=None)
1202
1202
1203 config.add_route(
1203 config.add_route(
1204 name='atom_feed_home_old',
1204 name='atom_feed_home_old',
1205 pattern='/{repo_name:.*?[^/]}/feed/atom', repo_route=True)
1205 pattern='/{repo_name:.*?[^/]}/feed/atom', repo_route=True)
1206 config.add_view(
1206 config.add_view(
1207 RepoFeedView,
1207 RepoFeedView,
1208 attr='atom',
1208 attr='atom',
1209 route_name='atom_feed_home_old', request_method='GET', renderer=None)
1209 route_name='atom_feed_home_old', request_method='GET', renderer=None)
1210
1210
1211 # NOTE(marcink): needs to be at the end for catch-all
1211 # NOTE(marcink): needs to be at the end for catch-all
1212 add_route_with_slash(
1212 add_route_with_slash(
1213 config,
1213 config,
1214 name='repo_summary',
1214 name='repo_summary',
1215 pattern='/{repo_name:.*?[^/]}', repo_route=True)
1215 pattern='/{repo_name:.*?[^/]}', repo_route=True)
1216 config.add_view(
1216 config.add_view(
1217 RepoSummaryView,
1217 RepoSummaryView,
1218 attr='summary',
1218 attr='summary',
1219 route_name='repo_summary', request_method='GET',
1219 route_name='repo_summary', request_method='GET',
1220 renderer='rhodecode:templates/summary/summary.mako')
1220 renderer='rhodecode:templates/summary/summary.mako')
1221
1221
1222 # TODO(marcink): there's no such route??
1222 # TODO(marcink): there's no such route??
1223 config.add_view(
1223 config.add_view(
1224 RepoSummaryView,
1224 RepoSummaryView,
1225 attr='summary',
1225 attr='summary',
1226 route_name='repo_summary_slash', request_method='GET',
1226 route_name='repo_summary_slash', request_method='GET',
1227 renderer='rhodecode:templates/summary/summary.mako') No newline at end of file
1227 renderer='rhodecode:templates/summary/summary.mako')
General Comments 0
You need to be logged in to leave comments. Login now