Changeset 7487


Ignore:
Timestamp:
21/09/10 11:36:50 (9 years ago)
Author:
astephen
Message:

Replaced use of "routes.url_for" function with the global "pylons.url"
function for compatibility with pylons 1.0.

Also removed commented out code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cowsserver/branches/migrate-py26-pylons10/lib/cowsserver/controllers/coastwms.py

    r6506 r7487  
    1313from cows.exceptions import InvalidParameterValue 
    1414 
    15 from routes import url_for 
    1615from cows.model.wms import WmsDatasetSummary 
    1716from cowsserver.lib.wms_request_log_utils import buildLogString, wms_request_logger 
     
    126125                bboxObjs.append(BoundingBox(bbox[:2], bbox[2:], crs=crs)) 
    127126                 
    128  
    129                  
    130             #URL to WCS - uses named route 'wcsroute' 
    131             #TODO: Allow for a WCS blacklist to opt out of providing dataurls for certain datasets? 
    132             #TODO: How to make this more configurable - what if WCS is not coupled with WMS? 
    133 #            try: 
    134 #                version='1.0.0' #wcs version 
    135 #                wcsbaseurl=url_for('wcsroute', fileoruri=c.fileoruri,qualified=True)+'?' 
    136 #                dataURLs=[DataURL(format='WCS:CoverageDescription', onlineResource='%sService=WCS&Request=DescribeCoverage&Coverage=%s&Version=%s'%(wcsbaseurl, layerName, version))] 
    137 #            except GenerationException: 
    138 #                log.info("dataURLs not populated: could not generate WCS url with url_for('wcsroute', filedoruri=%s,qualified=True)"%c.fileoruri) 
    139 #                dataURLs=[] 
    140              
    141127            onlineRes = OnlineResource(self._getIndexActionURL() +\ 
    142128                                    "?request=GetDisplayOptions&layers=%s" % layerName) 
     
    421407        """ 
    422408                 
    423         indexURL = url_for(qualified=True, action='index') 
     409        indexURL = pylons.url(qualified=True, action='index') 
    424410        return indexURL     
Note: See TracChangeset for help on using the changeset viewer.