source: TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/config/routing.py @ 5239

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/config/routing.py@5239
Revision 5239, 1.9 KB checked in by cbyrom, 11 years ago (diff)

Add Harvester class to run the jOAI Harvester API and run repository
harvests. Add code throughout the app to allow harvests to be
ran from the UI. Add new test data and tests to exercise the new
functionality and adjust the config file to allow input of required
harvest data. Add confirmation pop up when running deletes.

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
21    map.connect(':controller/:action/:id')
22    map.connect('home', 'home', controller = 'home', action='index')
23    map.connect('viewProviderInfo', 'viewProviderInfo/:providerName', controller = 'view', action='viewProviderInfo')
24    map.connect('editProviderInfo', 'editProviderInfo/:providerName', controller = 'edit', action='editProviderInfo')
25    map.connect('saveProviderInfo', 'saveProviderInfo/:providerName', controller = 'edit', action='saveProviderInfo')
26    map.connect('deleteProviderInfo', 'deleteProviderInfo/:providerName', controller = 'edit', action='deleteProviderInfo')
27    map.connect('createProviderInfo', 'createProviderInfo', controller = 'edit', action='createProviderInfo')
28    map.connect('harvestProviderInfo', 'harvestProviderInfo/:providerName/:repositoryName', controller = 'harvest', action='harvestProviderInfo')
29
30    map.connect('deleteRepositoryInfo', 'deleteProviderInfo/:providerName/:repositoryName', 
31                controller = 'edit', action='deleteRepositoryInfo')
32    map.connect('createRepositoryInfo', 'createProviderInfo/:providerName/:repositoryName', 
33                controller = 'edit', action='createRepositoryInfo')
34
35    map.connect('help', 'help', controller = 'home', action='showHelpPage')
36   
37
38    return map
Note: See TracBrowser for help on using the repository browser.