Mercurial > public > src > rhodecode
annotate pylons_app/config/routing.py @ 518:a3d9d24acbec celery
Implemented password reset(forms/models/ tasks) and mailing tasks.
Added smtp mailer, configurations, cleaned user model
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 13 Sep 2010 01:27:41 +0200 |
parents | 183cee110578 |
children | 9836541b0509 |
rev | line source |
---|---|
0 | 1 """Routes configuration |
2 | |
3 The more specific and detailed routes should be defined first so they | |
4 may take precedent over the more generic routes. For more information | |
5 refer to the routes manual at http://routes.groovie.org/docs/ | |
6 """ | |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
7 from __future__ import with_statement |
0 | 8 from routes import Mapper |
314
752675cdd167
made routes verification method based only on paths, since it's much faster and enough
Marcin Kuzminski <marcin@python-works.com>
parents:
313
diff
changeset
|
9 from pylons_app.lib.utils import check_repo_fast as cr |
0 | 10 |
43 | 11 def make_map(config): |
0 | 12 """Create, configure and return the routes Mapper""" |
43 | 13 map = Mapper(directory=config['pylons.paths']['controllers'], |
14 always_scan=config['debug']) | |
0 | 15 map.minimization = False |
43 | 16 map.explicit = False |
0 | 17 |
18 # The ErrorController route (handles 404/500 error pages); it should | |
19 # likely stay at the top, ensuring it can always be resolved | |
43 | 20 map.connect('/error/{action}', controller='error') |
21 map.connect('/error/{action}/{id}', controller='error') | |
0 | 22 |
23 # CUSTOM ROUTES HERE | |
70
9a2affee4a45
Updated defaults bug of htmlfill + changed routing
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
24 map.connect('hg_home', '/', controller='hg', action='index') |
47
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
44
diff
changeset
|
25 |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
26 def check_repo(environ, match_dict): |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
27 """ |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
28 check for valid repository for proper 404 handling |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
29 @param environ: |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
30 @param match_dict: |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
31 """ |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
32 repo_name = match_dict.get('repo_name') |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
33 return not cr(repo_name, config['base_path']) |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
34 |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
35 #REST REPO MAP |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
339
diff
changeset
|
36 with map.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
|
37 m.connect("repos", "/repos", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
38 action="create", conditions=dict(method=["POST"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
39 m.connect("repos", "/repos", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
40 action="index", conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
41 m.connect("formatted_repos", "/repos.{format}", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
42 action="index", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
43 conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
44 m.connect("new_repo", "/repos/new", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
45 action="new", conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
46 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
|
47 action="new", conditions=dict(method=["GET"])) |
312
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
|
48 m.connect("/repos/{repo_name:.*}", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
49 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:
312
diff
changeset
|
50 function=check_repo)) |
312
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
|
51 m.connect("/repos/{repo_name:.*}", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
52 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:
312
diff
changeset
|
53 function=check_repo)) |
312
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
|
54 m.connect("edit_repo", "/repos/{repo_name:.*}/edit", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
55 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:
312
diff
changeset
|
56 function=check_repo)) |
312
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
|
57 m.connect("formatted_edit_repo", "/repos/{repo_name:.*}.{format}/edit", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
58 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:
312
diff
changeset
|
59 function=check_repo)) |
312
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
|
60 m.connect("repo", "/repos/{repo_name:.*}", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
61 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:
312
diff
changeset
|
62 function=check_repo)) |
312
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
|
63 m.connect("formatted_repo", "/repos/{repo_name:.*}.{format}", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
64 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:
312
diff
changeset
|
65 function=check_repo)) |
312
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
|
66 #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
|
67 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*}", |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
68 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:
312
diff
changeset
|
69 function=check_repo)) |
312
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 |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
339
diff
changeset
|
71 map.resource('user', 'users', controller='admin/users', path_prefix='/_admin') |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
339
diff
changeset
|
72 map.resource('permission', 'permissions', controller='admin/permissions', path_prefix='/_admin') |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
73 |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
74 #REST SETTINGS MAP |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
75 with map.submapper(path_prefix='/_admin', controller='admin/settings') as m: |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
76 m.connect("admin_settings", "/settings", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
77 action="create", conditions=dict(method=["POST"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
78 m.connect("admin_settings", "/settings", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
79 action="index", conditions=dict(method=["GET"])) |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
439
diff
changeset
|
80 m.connect("formatted_admin_settings", "/settings.{format}", |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
81 action="index", conditions=dict(method=["GET"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
82 m.connect("admin_new_setting", "/settings/new", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
83 action="new", conditions=dict(method=["GET"])) |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
439
diff
changeset
|
84 m.connect("formatted_admin_new_setting", "/settings/new.{format}", |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
85 action="new", conditions=dict(method=["GET"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
86 m.connect("/settings/{setting_id}", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
87 action="update", conditions=dict(method=["PUT"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
88 m.connect("/settings/{setting_id}", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
89 action="delete", conditions=dict(method=["DELETE"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
90 m.connect("admin_edit_setting", "/settings/{setting_id}/edit", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
91 action="edit", conditions=dict(method=["GET"])) |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
439
diff
changeset
|
92 m.connect("formatted_admin_edit_setting", "/settings/{setting_id}.{format}/edit", |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
93 action="edit", conditions=dict(method=["GET"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
94 m.connect("admin_setting", "/settings/{setting_id}", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
95 action="show", conditions=dict(method=["GET"])) |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
439
diff
changeset
|
96 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}", |
401
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
97 action="show", conditions=dict(method=["GET"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
98 m.connect("admin_settings_my_account", "/my_account", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
99 action="my_account", conditions=dict(method=["GET"])) |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
100 m.connect("admin_settings_my_account_update", "/my_account_update", |
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
389
diff
changeset
|
101 action="my_account_update", conditions=dict(method=["PUT"])) |
412
ca54622e39a1
Added separate create repository views for non administrative users.
Marcin Kuzminski <marcin@python-works.com>
parents:
401
diff
changeset
|
102 m.connect("admin_settings_create_repository", "/create_repository", |
ca54622e39a1
Added separate create repository views for non administrative users.
Marcin Kuzminski <marcin@python-works.com>
parents:
401
diff
changeset
|
103 action="create_repository", conditions=dict(method=["GET"])) |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
104 |
92 | 105 #ADMIN |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
339
diff
changeset
|
106 with map.submapper(path_prefix='/_admin', controller='admin/admin') as m: |
319 | 107 m.connect('admin_home', '', action='index')#main page |
149
b3c93efd1c97
Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents:
148
diff
changeset
|
108 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
|
109 action='add_repo') |
439
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
412
diff
changeset
|
110 #SEARCH |
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
412
diff
changeset
|
111 map.connect('search', '/_admin/search', controller='search') |
74
cdf4fda66dd9
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
70
diff
changeset
|
112 |
518
a3d9d24acbec
Implemented password reset(forms/models/ tasks) and mailing tasks.
Marcin Kuzminski <marcin@python-works.com>
parents:
509
diff
changeset
|
113 #LOGIN/LOGOUT/REGISTER/SIGN IN |
389
98abf8953b87
Added user registration, changed login url schema, moved it into _admin/ for safety
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
114 map.connect('login_home', '/_admin/login', controller='login') |
98abf8953b87
Added user registration, changed login url schema, moved it into _admin/ for safety
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
115 map.connect('logout_home', '/_admin/logout', controller='login', action='logout') |
98abf8953b87
Added user registration, changed login url schema, moved it into _admin/ for safety
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
116 map.connect('register', '/_admin/register', controller='login', action='register') |
518
a3d9d24acbec
Implemented password reset(forms/models/ tasks) and mailing tasks.
Marcin Kuzminski <marcin@python-works.com>
parents:
509
diff
changeset
|
117 map.connect('reset_password', '/_admin/password_reset', controller='login', action='password_reset') |
389
98abf8953b87
Added user registration, changed login url schema, moved it into _admin/ for safety
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
118 |
205
66b20f525750
Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
181
diff
changeset
|
119 #FEEDS |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
120 map.connect('rss_feed_home', '/{repo_name:.*}/feed/rss', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
121 controller='feed', action='rss', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
122 conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
123 map.connect('atom_feed_home', '/{repo_name:.*}/feed/atom', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
124 controller='feed', action='atom', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
125 conditions=dict(function=check_repo)) |
205
66b20f525750
Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
181
diff
changeset
|
126 |
74
cdf4fda66dd9
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
70
diff
changeset
|
127 |
339
8026872a10ee
Moved admin controllers to separate module
Marcin Kuzminski <marcin@python-works.com>
parents:
336
diff
changeset
|
128 #OTHERS |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
129 map.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
130 controller='changeset', revision='tip', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
131 conditions=dict(function=check_repo)) |
509
183cee110578
first implementation of #34 changeset raw diff based on udiff from python
Marcin Kuzminski <marcin@python-works.com>
parents:
501
diff
changeset
|
132 map.connect('raw_changeset_home', '/{repo_name:.*}/raw-changeset/{revision}', |
183cee110578
first implementation of #34 changeset raw diff based on udiff from python
Marcin Kuzminski <marcin@python-works.com>
parents:
501
diff
changeset
|
133 controller='changeset',action='raw_changeset', revision='tip', |
183cee110578
first implementation of #34 changeset raw diff based on udiff from python
Marcin Kuzminski <marcin@python-works.com>
parents:
501
diff
changeset
|
134 conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
135 map.connect('summary_home', '/{repo_name:.*}/summary', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
136 controller='summary', conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
137 map.connect('shortlog_home', '/{repo_name:.*}/shortlog', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
138 controller='shortlog', conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
139 map.connect('branches_home', '/{repo_name:.*}/branches', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
140 controller='branches', conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
141 map.connect('tags_home', '/{repo_name:.*}/tags', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
142 controller='tags', conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
143 map.connect('changelog_home', '/{repo_name:.*}/changelog', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
144 controller='changelog', conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
145 map.connect('files_home', '/{repo_name:.*}/files/{revision}/{f_path:.*}', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
146 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:
312
diff
changeset
|
147 conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
148 map.connect('files_diff_home', '/{repo_name:.*}/diff/{f_path:.*}', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
149 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:
312
diff
changeset
|
150 conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
151 map.connect('files_raw_home', '/{repo_name:.*}/rawfile/{revision}/{f_path:.*}', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
152 controller='files', action='rawfile', revision='tip', f_path='', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
153 conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
154 map.connect('files_annotate_home', '/{repo_name:.*}/annotate/{revision}/{f_path:.*}', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
155 controller='files', action='annotate', revision='tip', f_path='', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
156 conditions=dict(function=check_repo)) |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
157 map.connect('files_archive_home', '/{repo_name:.*}/archive/{revision}/{fileformat}', |
313
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
158 controller='files', action='archivefile', revision='tip', |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
312
diff
changeset
|
159 conditions=dict(function=check_repo)) |
336
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
319
diff
changeset
|
160 map.connect('repo_settings_update', '/{repo_name:.*}/settings', |
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
319
diff
changeset
|
161 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:
319
diff
changeset
|
162 conditions=dict(method=["PUT"], 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:
319
diff
changeset
|
163 map.connect('repo_settings_home', '/{repo_name:.*}/settings', |
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
319
diff
changeset
|
164 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:
319
diff
changeset
|
165 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:
319
diff
changeset
|
166 |
05b212954275
Implemented owner settings, as separete posibility to edit repositry by non administrative owner of repository
Marcin Kuzminski <marcin@python-works.com>
parents:
319
diff
changeset
|
167 |
0 | 168 return map |