source: MILK/trunk/milk_server/milk_server/config/routing.py @ 4476

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/config/routing.py@4476
Revision 4476, 2.9 KB checked in by cbyrom, 11 years ago (diff)

Remove the viewItems controller - for visualising WCS/WMS data - and remove associated code.

Line 
1"""
2Setup your Routes options here
3"""
4import os
5from routes import Mapper
6
7def make_map():
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/
20   
21    # atom editor specific routing
22    map.connect('upload/:uri', controller = 'atom_editor/editatom', action='upload', uri = None)
23    map.connect('editAtom/:uri', controller = 'atom_editor/editatom', action='edit')
24    map.connect('saveAtom/:uri/:saveLevel', controller = 'atom_editor/editatom', \
25                action='saveAtom', saveLevel='0')
26    map.connect('createAtom/:saveData', controller = 'atom_editor/editatom', action='create', \
27                saveData = None)
28    map.connect('createGranule', controller = 'atom_editor/editatom', action='createGranule')
29    map.connect('atomHome', controller = 'atom_editor/listatom', action='atomHome')
30    map.connect('listAtom/:searchData/:associatedAtomID/:associatedAtomType/:associationType', \
31                controller = 'atom_editor/listatom', action='list', searchData='', \
32                associatedAtomID='', associatedAtomType='', associationType='')
33    map.connect('viewDeployments/:uri', controller = 'retrieve', action='viewDeployments')
34
35    # routing for the browse/discovery server
36    map.connect('login', controller='login')
37    map.connect('getCredentials', controller='login', action='getCredentials')
38    map.connect('wayf', controller='wayf')
39    map.connect('logout', controller='logout')
40    map.connect('semantic',controller='discovery', action='semantic')
41    map.connect('view/:uri', controller = 'retrieve', action='view')
42    map.connect('askCorrect/:uri', controller='retrieve', action='askCorrect')
43    map.connect('correct/:uri', controller='retrieve', action='correct')
44    map.connect('retrieve/:uri', controller = 'retrieve')
45    map.connect('selectedItems',controller='selectedItems',action='index')
46    map.connect('addSelectedItem/:entryid/:divid',
47                controller='selectedItems',action='addSelectedItem')
48    map.connect('unSelectItem/:entryid/:divid', controller='selectedItems',action='unSelectItem')
49    map.connect('removeSelectedItem/:entryid',controller='selectedItems',action='removeSelectedItem')
50
51    map.connect('discovery',controller='discovery')
52    #do this last or else you'll get bizarre behaviour
53    map.connect('',controller='discovery',action='index')
54    map.connect('clearSession',controller='discovery',action='clearSession')
55    return map
Note: See TracBrowser for help on using the repository browser.