source: qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/config/routing.py @ 5849

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/qesdi/wms_ddc_vis/trunk/lib/wms_ddc_vis/config/routing.py@5849
Revision 5849, 1.6 KB checked in by pnorton, 11 years ago (diff)

Added some code to try and pass the axis config xml to the UI.

Also included a modified version of the beaker cache decorator that I've been using to cache the coastline map.

Line 
1"""Routes configuration
2
3The more specific and detailed routes should be defined first so they
4may take precedent over the more generic routes. For more information
5refer to the routes manual at http://routes.groovie.org/docs/
6"""
7from pylons import config
8from routes import Mapper
9
10def make_map():
11    """Create, configure and return the routes Mapper"""
12    map = Mapper(directory=config['pylons.paths']['controllers'],
13                 always_scan=config['debug'])
14
15    # The ErrorController route (handles 404/500 error pages); it should
16    # likely stay at the top, ensuring it can always be resolved
17    map.connect('error/:action/:id', controller='error')
18
19    # CUSTOM ROUTES HERE
20    map.connect('coastwms', controller='coastwms')
21
22    map.connect(':fileoruri/wms', controller='csmlwms')
23    map.connect(':fileoruri/wms2', controller='csmlwms_csml_geoplot')
24    map.connect(':fileoruri/wms3', controller='csmlwms_csml')   
25   
26    map.connect('wcsroute', ':fileoruri/wcs', controller='csmlwcs') #wcsroute is a named route.
27    map.connect('wcsroute', ':fileoruri/wcs3', controller='csmlwcs') #wcsroute is a named route.
28    map.connect(':fileoruri/wfs', controller='csmlwfs')
29    #filestore - used for fetching files referenced by (csml) StorageDescriptors (WFS), and  'store' in wcs if implemented
30    map.connect('filestore/:file', controller='fetch', action='fetchFile')
31    map.connect(':fileoruri/demo', controller='demo')
32    map.connect('', controller='catalogue')
33
34
35    map.connect(':controller/:action/:id')
36    map.connect('*url', controller='template', action='view')
37
38    return map
Note: See TracBrowser for help on using the repository browser.