Changeset 4723


Ignore:
Timestamp:
05/01/09 09:48:00 (11 years ago)
Author:
cbyrom
Message:

Update routing to use simplified reference names for routes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/config/routing.py

    r4697 r4723  
    88    root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
    99 
    10     map = Mapper(directory=os.path.join(root_path, 'controllers')) 
     10    map = Mapper(directory=os.path.join(root_path, 'controllers'))#, explicit=True) 
    1111     
    1212    # This route handles displaying the error page and graphics used in the 404/500 
     
    2020     
    2121    # atom editor specific routing 
    22     map.connect('upload/:uri', controller = 'atom_editor/editatom', action='upload', uri = None) 
    23     map.connect('deleteAtom/:uri', controller = 'atom_editor/editatom', action='delete') 
    24     map.connect('editAtom/:uri', controller = 'atom_editor/editatom', action='edit') 
    25     map.connect('saveAtom/:uri/:saveLevel', controller = 'atom_editor/editatom', \ 
     22    map.connect('upload', 'upload/:uri', controller = 'atom_editor/editatom', action='upload', uri = None) 
     23    map.connect('delete', 'deleteAtom/:uri', controller = 'atom_editor/editatom', action='delete') 
     24    map.connect('edit', 'editAtom/:uri', controller = 'atom_editor/editatom', action='edit') 
     25    map.connect('save', 'saveAtom/:uri/:saveLevel', controller = 'atom_editor/editatom', \ 
    2626                action='saveAtom', saveLevel='0') 
    27     map.connect('createAtom/:saveData', controller = 'atom_editor/editatom', action='create', \ 
     27    map.connect('create', 'createAtom/:saveData', controller = 'atom_editor/editatom', action='create', \ 
    2828                saveData = None) 
    29     map.connect('createGranule', controller = 'atom_editor/editatom', action='createGranule') 
    30     map.connect('exampleGranulite', controller = 'atom_editor/listatom', action='showExampleGranulite') 
    31     map.connect('atomHome', controller = 'atom_editor/listatom', action='atomHome') 
    32     map.connect('listAtom/:searchData/:associatedAtomID/:associatedAtomType/:associationType', \ 
     29    map.connect('createGranule', 'createGranule', controller = 'atom_editor/editatom', action='createGranule') 
     30    map.connect('example', 'exampleGranulite', controller = 'atom_editor/listatom', action='showExampleGranulite') 
     31    map.connect('help', 'help', controller = 'atom_editor/listatom', action='showAtomHelp') 
     32    map.connect('home', 'atomHome', controller = 'atom_editor/listatom', action='atomHome') 
     33    map.connect('list', 'listAtom/:searchData/:associatedAtomID/:associatedAtomType/:associationType', \ 
    3334                controller = 'atom_editor/listatom', action='list', searchData='', \ 
    3435                associatedAtomID='', associatedAtomType='', associationType='') 
    35     map.connect('viewAssociatedData/:type/:uri', controller = 'browse/retrieve', action='viewAssociatedData') 
     36    map.connect('view', 'viewAssociatedData/:type/:uri', controller = 'browse/retrieve', action='viewAssociatedData') 
    3637 
    3738    # routing for the browse/discovery server 
     
    4445    map.connect('askCorrect/:uri', controller='browse/retrieve', action='askCorrect') 
    4546    map.connect('correct/:uri', controller='browse/retrieve', action='correct') 
    46     map.connect('retrieve/:uri', controller = 'browse/retrieve') 
     47    map.connect('retrive', 'retrieve/:uri', controller = 'browse/retrieve') 
    4748    map.connect('selectedItems',controller='visualise/selectedItems',action='index') 
    4849    map.connect('viewItems',controller='visualise/viewItems',action='index') 
     
    5354 
    5455    map.connect('discovery',controller='browse/discovery') 
     56 
    5557    #do this last or else you'll get bizarre behaviour 
    5658    map.connect('',controller='browse/discovery',action='index') 
Note: See TracChangeset for help on using the changeset viewer.