source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/ndgMiddleware.py @ 2616

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/ndgMiddleware.py@2616
Revision 2616, 1013 bytes checked in by lawrence, 12 years ago (diff)

Further modifications to the ows stack to get the retrieve
document working ... (with css)

Line 
1# ndg middleware
2from paste.deploy import CONFIG
3from ows_server.lib.ndg.Utilities import myConfig
4
5class ndgMiddleware:
6   
7    def __init__(self,app,g):
8       
9        #this is the next application in the wsgi stack
10        self.app=app
11       
12        #set up the ndg configuration file
13        cf=CONFIG.get('configfile')
14        cf=myConfig(cf)
15     
16        self.globals=g
17        self.globals.localLink=cf.get('layout','localLink',None)
18        self.globals.localImage=cf.get('layout','localImage',None)
19        self.globals.localAlt=cf.get('layout','localAlt','Visit Local Site')
20        self.globals.ndgLink=cf.get('layout','ndgLink','http://ndg.nerc.ac.uk')
21        self.globals.ndgImage=cf.get('layout','ndgImage',None)
22        self.globals.ndgAlt=cf.get('layout','ndgAlt','Visit NDG')
23        self.globals.PageLogo=cf.get('layout','pageLogo',None)
24        self.config=cf
25       
26       
27    def __call__(self,environ,start_response):
28       
29        environ['ndgConfig']=self.config
30        return self.app(environ,start_response)
31   
Note: See TracBrowser for help on using the repository browser.