Changeset 5300 for cowsclient


Ignore:
Timestamp:
18/05/09 13:44:52 (10 years ago)
Author:
domlowe
Message:

removing some of the hardcoded stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/cowsclient/controllers/wmsviz.py

    r5265 r5300  
    1515from cowsclient.lib.wmc_util import * 
    1616from cowsclient.model import selectedItem 
     17from pylons import config 
    1718import copy, logging 
    1819log = logging.getLogger(__name__) 
     
    2627        log.debug('wmsviz controller') 
    2728        self.inputs=dict(parse_querystring(request.environ)) 
    28         log.debug(self.inputs) 
     29        log.info(self.inputs) 
    2930        c.wmcURL = "" 
    3031        # check if all we're doing is removing a view item 
     
    4041 
    4142         
    42         #temporary hack: provide some WMC urls and server information 
    43         g.server="http://localhost:5005"         
    44         endpoint1='http://127.0.0.1:5000/famous/wms?request=GetContext&service=WMS' 
    45         endpoint2='http://127.0.0.1:5000/hadcm3/wms?request=GetContext&service=WMS' 
    46         endpoint3='http://127.0.0.1:5000/famous_control_year/wms?request=GetContext&service=WMS' 
    47         self.addViewItem(endpoint1) 
    48         self.addViewItem(endpoint2) 
    49         #self.addViewItem(endpoint3) 
     43        #get server information from config file 
     44        g.server=config['app_conf']['serverurl'] 
     45     
    5046         
    5147        #TODO: WORK OUT HOW TO COUPLE THIS TO BROWSE 
     
    5652             
    5753        # if ENDPOINT specified, we've reached the page via the WMC icon 
     54                 
    5855        if ('ENDPOINT' in self.inputs): 
    5956            self.addViewItem(self.inputs['ENDPOINT']) 
     
    6360#            h.redirect_to(h.url_for(controller='discovery')) 
    6461#                                         
    65         # session.save()  causes pickling crash 
     62        session.save()   
     63        log.info('SAVED SESSION') 
    6664         
    6765        # check if page has been visited before; if not display tab 
Note: See TracChangeset for help on using the changeset viewer.