Changeset 4467
- Timestamp:
- 20/11/08 15:35:54 (12 years ago)
- Location:
- MILK/trunk/milk_server/milk_server
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
MILK/trunk/milk_server/milk_server/__init__.py
r2476 r4467 1 1 """ 2 ows_server2 milk_server 3 3 4 This file loads the finished app from ows_server.config.middleware.4 This file loads the finished app from milk_server.config.middleware. 5 5 6 6 """ 7 7 8 from ows_server.config.middleware import make_app8 from milk_server.config.middleware import make_app -
MILK/trunk/milk_server/milk_server/config/environment.py
r4198 r4467 5 5 from pylons import config 6 6 7 import ows_server.lib.app_globals as app_globals8 import ows_server.lib.helpers9 from ows_server.config.routing import make_map7 import milk_server.lib.app_globals as app_globals 8 import milk_server.lib.helpers 9 from milk_server.config.routing import make_map 10 10 11 11 # Set-up tools package import for locating NDG Security SSO Service … … 28 28 29 29 # Initialize config with the basic options 30 config.init_app(global_conf, app_conf, package=' ows_server',30 config.init_app(global_conf, app_conf, package='milk_server', 31 31 template_engine='kid', paths=paths) 32 config.add_template_engine("genshi", " ows_server.templates", {})32 config.add_template_engine("genshi", "milk_server.templates", {}) 33 33 34 34 config['pylons.g'] = app_globals.Globals() 35 config['pylons.h'] = ows_server.lib.helpers35 config['pylons.h'] = milk_server.lib.helpers 36 36 config['routes.map'] = make_map() 37 37 -
MILK/trunk/milk_server/milk_server/config/middleware.py
r3919 r4467 11 11 from pylons.wsgiapp import PylonsApp 12 12 13 from ows_server.config.environment import load_environment13 from milk_server.config.environment import load_environment 14 14 15 from ows_server.config.ndgMiddleware import ndgMiddleware15 from milk_server.config.ndgMiddleware import ndgMiddleware 16 16 17 17 # Logging doesn't need configuring if you have paste.translogger in your config file. … … 43 43 # Put your own middleware here, so that any problems are caught by the error 44 44 # handling middleware underneath 45 46 45 app = ndgMiddleware(app, g, app_conf) 47 46 g=app.globals 48 47 49 # Configure logging 48 # Configure logging - NB logging config set in the development.ini file 50 49 #logging.basicConfig(format='%(thread)s %(name)s %(levelname)s %(message)s') 51 50 -
MILK/trunk/milk_server/milk_server/config/ndgMiddleware.py
r4420 r4467 1 1 # ndg middleware 2 2 from paste.deploy import CONFIG 3 from ows_server.models.Utilities import myConfig3 from milk_server.lib.Utilities import myConfig 4 4 5 5 … … 15 15 16 16 #set up the ndg configuration file 17 18 #Changed by Dom: CONFIG.get wasn't respecting the %(home)s variable, so moved to app_conf section in ini file.19 #cf=CONFIG.get('configfile')20 17 cf= CONFIG['app_conf']['configfile'] 21 18 cf=myConfig(cf) … … 24 21 self.globals.htdocs=cf.get('DEFAULT','htdocs',None) 25 22 self.globals.localLink=cf.get('layout','localLink',None) 26 self.globals.localImage=cf.get('layout','localImage',None)27 23 self.globals.localAlt=cf.get('layout','localAlt','Visit Local Site') 28 24 self.globals.ndgLink=cf.get('layout','ndgLink','http://ndg.nerc.ac.uk') -
MILK/trunk/milk_server/milk_server/config/routing.py
r4420 r4467 18 18 # so they may take precedent over the more generic routes. For more information, refer 19 19 # to the routes manual @ http://routes.groovie.org/docs/ 20 #map.connect(':controller/:action/:id')21 #map.connect('*url', controller='template', action='view')22 20 23 #WMS 24 map.connect(':file/wms', controller='csml_wms') #should become obsolete 25 map.connect('wms/:uri', controller='csml_wms') 26 27 #WCS 28 #map.connect(':file/status/:jobID', controller='status', action='getStatus') #not used currently 29 #wcs controller for all versions: (called wcsx) 30 map.connect('wcs/:uri', controller='csml_wcsx') 31 32 #filestore - used for 'store' in wcs 33 map.connect('filestore/:file', controller='fetch', action='fetchFile') 34 35 # following is the shell for the rest of the ndg 36 map.connect('upload/:uri', controller = 'editatom', action='upload', uri = None) 37 map.connect('editAtom/:uri', controller = 'editatom', action='edit') 38 map.connect('saveAtom/:uri/:saveLevel', controller = 'editatom', \ 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', \ 39 25 action='saveAtom', saveLevel='0') 40 map.connect('createAtom/:saveData', controller = ' editatom', action='create', \26 map.connect('createAtom/:saveData', controller = 'atom_editor/editatom', action='create', \ 41 27 saveData = None) 42 map.connect('createGranule', controller = ' editatom', action='createGranule')43 map.connect('atomHome', controller = ' listatom', action='atomHome')28 map.connect('createGranule', controller = 'atom_editor/editatom', action='createGranule') 29 map.connect('atomHome', controller = 'atom_editor/listatom', action='atomHome') 44 30 map.connect('listAtom/:searchData/:associatedAtomID/:associatedAtomType/:associationType', \ 45 controller = ' listatom', action='list', searchData='', \31 controller = 'atom_editor/listatom', action='list', searchData='', \ 46 32 associatedAtomID='', associatedAtomType='', associationType='') 47 33 map.connect('viewDeployments/:uri', controller = 'retrieve', action='viewDeployments') 48 34 49 35 # routing for the browse/discovery server 50 36 map.connect('login', controller='login') 51 37 map.connect('getCredentials', controller='login', action='getCredentials') … … 64 50 map.connect('unSelectItem/:entryid/:divid', controller='selectedItems',action='unSelectItem') 65 51 map.connect('removeSelectedItem/:entryid',controller='selectedItems',action='removeSelectedItem') 66 map.connect('visualise', controller='visualise', action='index')67 52 68 # This route doesn't match the controller's parameters.69 #map.connect('csml/:uri', controller='csml_api')70 # Below is the way it worked before with added71 #"csml" path component72 #map.connect('csml/:file.:format', controller='csml_api', action='index',73 #format='html')74 #map.connect('csml/:file/:(feature).:format', action='getFeature',75 #controller='csml_api', format='html')76 #map.connect('csml/:file/:feature/:action', controller='csml_api')77 78 map.connect('trackback/:uri', controller='trackback')79 53 map.connect('discovery',controller='discovery') 80 map.connect('visualise/:dataset/:view',controller='visualise',action='tabChange')81 map.connect('visualise/:view',controller='visualise',action='featureChange')82 54 #do this last or else you'll get bizarre behaviour 83 55 map.connect('',controller='discovery',action='index') -
MILK/trunk/milk_server/milk_server/websetup.py
r2476 r4467 3 3 def setup_config(command, filename, section, vars): 4 4 """ 5 Place any commands to setup ows_server here.5 Place any commands to setup milk_server here. 6 6 """ 7 7 conf = paste.deploy.appconfig('config:' + filename)
Note: See TracChangeset
for help on using the changeset viewer.