def capabilities_helper(): '''An example template helper function.''' # Just return some example text. import urllib2 import owslib.wps from owslib.wps import WebProcessingService, monitorExecution response = urllib2.urlopen(str(plugins.toolkit.c.resource['origin_url'])) tmp = response.read() wps = WebProcessingService(str(plugins.toolkit.c.resource['origin_url'])) #wps.getcapabilities(tmp) wps.processes1 = wps.processes #[:len(wps.processes)/2] wps.provider.contact.keys = dir(wps.provider.contact) wps.resource = plugins.toolkit.c.resource wps.package = plugins.toolkit.c.package return wps
def capabilities_helper(): '''An example template helper function.''' # Just return some example text. import urllib2 import owslib.wps from owslib.wps import WebProcessingService, monitorExecution response = urllib2.urlopen(str(plugins.toolkit.c.resource['origin_url'])) tmp=response.read() wps=WebProcessingService(str(plugins.toolkit.c.resource['origin_url'])) #wps.getcapabilities(tmp) wps.processes1=wps.processes#[:len(wps.processes)/2] wps.provider.contact.keys=dir(wps.provider.contact) wps.resource=plugins.toolkit.c.resource wps.package=plugins.toolkit.c.package return wps