##// END OF EJS Templates
home: removed old pylons routes and convert them to pyramid ops app
marcink -
r2099:d2ff8722 default
parent child Browse files
Show More
@@ -36,6 +36,11 b' def admin_routes(config):'
36 def includeme(config):
36 def includeme(config):
37
37
38 config.include(admin_routes, route_prefix=ADMIN_PREFIX + '/ops')
38 config.include(admin_routes, route_prefix=ADMIN_PREFIX + '/ops')
39 # make OLD entries from pylons work
40 config.add_route(
41 name='ops_ping_legacy', pattern=ADMIN_PREFIX + '/ping')
42 config.add_route(
43 name='ops_error_test_legacy', pattern=ADMIN_PREFIX + '/error_test')
39
44
40 # Scan module for configuration decorators.
45 # Scan module for configuration decorators.
41 config.scan('.views', ignore='.tests')
46 config.scan('.views', ignore='.tests')
@@ -41,6 +41,9 b' class OpsView(BaseAppView):'
41 @view_config(
41 @view_config(
42 route_name='ops_ping', request_method='GET',
42 route_name='ops_ping', request_method='GET',
43 renderer='json_ext')
43 renderer='json_ext')
44 @view_config(
45 route_name='ops_ping_legacy', request_method='GET',
46 renderer='json_ext')
44 def ops_ping(self):
47 def ops_ping(self):
45 data = {
48 data = {
46 'instance': self.request.registry.settings.get('instance_id'),
49 'instance': self.request.registry.settings.get('instance_id'),
@@ -55,6 +58,9 b' class OpsView(BaseAppView):'
55 @view_config(
58 @view_config(
56 route_name='ops_error_test', request_method='GET',
59 route_name='ops_error_test', request_method='GET',
57 renderer='json_ext')
60 renderer='json_ext')
61 @view_config(
62 route_name='ops_error_test_legacy', request_method='GET',
63 renderer='json_ext')
58 def ops_error_test(self):
64 def ops_error_test(self):
59 """
65 """
60 Test exception handling and emails on errors
66 Test exception handling and emails on errors
@@ -172,10 +172,6 b' def make_map(config):'
172 # CUSTOM ROUTES HERE
172 # CUSTOM ROUTES HERE
173 #==========================================================================
173 #==========================================================================
174
174
175 # ping and pylons error test
176 rmap.connect('ping', '%s/ping' % (ADMIN_PREFIX,), controller='home', action='ping')
177 rmap.connect('error_test', '%s/error_test' % (ADMIN_PREFIX,), controller='home', action='error_test')
178
179 # ADMIN REPOSITORY GROUPS ROUTES
175 # ADMIN REPOSITORY GROUPS ROUTES
180 with rmap.submapper(path_prefix=ADMIN_PREFIX,
176 with rmap.submapper(path_prefix=ADMIN_PREFIX,
181 controller='admin/repo_groups') as m:
177 controller='admin/repo_groups') as m:
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now