Changeset 3480


Ignore:
Timestamp:
20/02/08 17:00:41 (12 years ago)
Author:
spascoe
Message:

Made compatible with latest ows_common-refactor

Location:
DPPP/ukcip02_server/trunk/ukcip_server
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • DPPP/ukcip02_server/trunk/ukcip_server/development.ini

    r3367 r3480  
    1111error_email_from = paste@localhost 
    1212ukcip02.data_dir = /home/users/spascoe/host/saturn/data/ukcip02 
     13ows_server.exception_type = pylons 
     14ows_server.capabilities_config = ./capabilities.conf 
    1315 
    1416[server:main] 
    1517use = egg:Paste#http 
    1618host = 0.0.0.0 
    17 port = 8080 
     19port = 8421 
    1820 
    1921[app:main] 
  • DPPP/ukcip02_server/trunk/ukcip_server/ukcip_server/controllers/ukcip_wms.py

    r3409 r3480  
    44from matplotlib.cm import get_cmap 
    55 
    6 from ows_common.pylons.ows_controller import OwsController 
    7 from ows_common.pylons.decorators import ows_operation 
     6from ows_common.pylons.ows_controller import OwsController, genshiLoader 
    87from ows_common.exceptions import * 
    98 
     
    1615class UkcipWmsController(OwsController): 
    1716 
    18     # Overriding OwsController class attributes 
     17    service = 'WMS' 
     18    owsOperations = OwsController.owsOperations + ['GetMap', 'GetInfo'] 
    1919    validVersions = ['1.1.1'] 
    2020 
     21    def _renderCapabilities(self, version, format): 
     22        t = genshiLoader.load('wms_capabilities_1_1_1.xml') 
     23        return t.generate(c=c).render() 
    2124 
    22     @operation 
    23     def GetCapabilitites(self): 
    24         cap = CapabilitiesHelper(self) 
    25          
    26  
    27     def getCapabilitiesTemplate(self, version, format): 
    28         if format != 'text/xml': 
    29             raise InvalidParameterValue('Only text/xml format supported', 'format') 
    30  
    31         return 'capabilities' 
    32  
    33         #!TODO: return the template 
    34         raise NotImplementedError 
    35  
    36     @ows_operation 
    3725    def GetMap(self): 
    3826 
     
    10088        return request 
    10189 
    102     @ows_operation 
    10390    def GetInfo(self): 
    10491        from pprint import pformat 
Note: See TracChangeset for help on using the changeset viewer.