Changeset 4078 for cows/trunk/cows


Ignore:
Timestamp:
30/07/08 14:12:01 (11 years ago)
Author:
spascoe
Message:

JSON Capabilities implemented as a template.

Location:
cows/trunk/cows/pylons
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/wms_controller.py

    r4076 r4078  
    1616 
    1717import Image 
    18 import simplejson 
     18from genshi.template import NewTextTemplate 
    1919 
    2020from cows.model.wms import WmsDatasetSummary, Dimension 
     
    7272 
    7373    def _renderCapabilities(self, version, format): 
    74         #!TODO: correct json MIME type 
    7574        if format == 'application/json': 
    76             return [simplejson.dumps(c.capabilities)] 
    77         if version == '1.1.1': 
     75            t = ows_controller.templateLoader.load('wms_capabilities_json.txt', 
     76                                                   cls=NewTextTemplate) 
     77        elif version == '1.1.1': 
    7878            t = ows_controller.templateLoader.load('wms_capabilities_1_1_1.xml') 
    7979        elif version == '1.3.0': 
Note: See TracChangeset for help on using the changeset viewer.