source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py @ 2629

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py@2629
Revision 2629, 2.2 KB checked in by spascoe, 13 years ago (diff)

Added more logging. Requests are now logged and OWSExceptions are
logged as well as triggering an XML response. Requests to WMS/GetMap don't
trigger the debugger because it screws up openlayers.

Some changes to routes to make csml_api work again. No doubt this will change
when we have Exist plumbed in.

RevLine 
[2476]1"""
2Setup your Routes options here
3"""
4import os
5from routes import Mapper
6
7def make_map(global_conf={}, app_conf={}):
8    root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
9
10    map = Mapper(directory=os.path.join(root_path, 'controllers'))
11   
12    # This route handles displaying the error page and graphics used in the 404/500
13    # error pages. It should likely stay at the top to ensure that the error page is
14    # displayed properly.
15    map.connect('error/:action/:id', controller='error')
16   
17    # Define your routes. The more specific and detailed routes should be defined first,
18    # so they may take precedent over the more generic routes. For more information, refer
19    # to the routes manual @ http://routes.groovie.org/docs/
[2494]20    #map.connect(':controller/:action/:id')
21    #map.connect('*url', controller='template', action='view')
[2614]22   
23    # These should conform to http://proj.badc.rl.ac.uk/ndg/wiki/PasteStack
24    # ... but don't ... yet ...
[2476]25
[2614]26    # the NDG OGC services
27    # change these when security layer is present and not before
28    #to
29    # map.connect('wms/:file',controller='csml_wms')
30    # map.connect('wcs/:file',controller='csml_wcs')
31   
[2494]32    map.connect(':file/wms', controller='csml_wms')
[2589]33    map.connect(':file/wcs', controller='csml_wcs')
[2614]34   
35    # following is the shell for the rest of the ndg
36    map.connect('login', controller='login')
[2626]37    map.connect('wayf', controller='login', action='wayf')
[2614]38    map.connect('logout', controller='logout')
39    map.connect('view/:uri', controller = 'retrieve', action='view')
40    map.connect('retrieve/:uri', controller = 'retrieve')
[2629]41
42    # This route doesn't match the controller's parameters.
43    #map.connect('csml/:uri', controller='csml_api')
44    # Below is the way it worked before with added
45    # "csml" path component
46    map.connect('csml/:file.:format', controller='csml_api', action='index',
47                format='html')
48    map.connect('csml/:file/:(feature).:format', action='getFeature',
49                controller='csml_api', format='html')
50    map.connect('csml/:file/:feature/:action', controller='csml_api')
51
[2614]52    map.connect('trackback/:uri', controller='trackback')
53    map.connect('discovery',controller='discovery')
54 
[2476]55    return map
Note: See TracBrowser for help on using the repository browser.