0001-workflows-use-self.compute-for-geolocation-and-signa.patch
wcs/wf/geolocate.py | ||
---|---|---|
29 | 29 |
from qommon import get_logger |
30 | 30 |
from qommon.form import RadiobuttonsWidget, StringWidget, CheckboxWidget |
31 | 31 |
from qommon.misc import http_get_page |
32 |
from wcs.workflows import (WorkflowStatusItem, register_item_class, |
|
33 |
template_on_formdata) |
|
32 |
from wcs.workflows import WorkflowStatusItem, register_item_class |
|
34 | 33 | |
35 | 34 |
class GeolocateWorkflowStatusItem(WorkflowStatusItem): |
36 | 35 |
description = N_('Geolocate') |
... | ... | |
107 | 106 |
nominatim_url = 'http://nominatim.openstreetmap.org' |
108 | 107 | |
109 | 108 |
try: |
110 |
address = template_on_formdata(formdata, self.address_string)
|
|
109 |
address = self.compute(self.address_string, raises=True)
|
|
111 | 110 |
except Exception, e: |
112 | 111 |
get_logger().error('error in template for address string [%r]', e) |
113 | 112 |
return |
wcs/wf/wscall.py | ||
---|---|---|
29 | 29 |
from qommon.misc import (http_get_page, http_post_request, get_variadic_url, |
30 | 30 |
JSONEncoder, json_loads, site_encode) |
31 | 31 |
from wcs.workflows import (WorkflowStatusItem, register_item_class, |
32 |
template_on_formdata, AbortActionException, AttachmentEvolutionPart)
|
|
32 |
AbortActionException, AttachmentEvolutionPart) |
|
33 | 33 |
from wcs.api_utils import sign_url |
34 | 34 | |
35 | 35 |
TIMEOUT = 30 |
... | ... | |
234 | 234 |
url = get_variadic_url(url, variables) |
235 | 235 | |
236 | 236 |
if self.request_signature_key: |
237 |
signature_key = template_on_formdata(formdata, self.request_signature_key)
|
|
237 |
signature_key = self.compute(self.request_signature_key)
|
|
238 | 238 |
if signature_key: |
239 | 239 |
url = sign_url(url, signature_key) |
240 | 240 | |
241 |
- |