summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2022-06-29 10:09:04 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2022-06-29 10:09:04 (GMT)
commit217747e5c449253ba22c3670ddcabedc07a0d051 (patch)
tree7b9e1a03f9a1365f61d48ee6480ba5ca50cb6c87
parent6628d594faf90735ac48e45a4d788c0e3d65d21a (diff)
downloadpasserelle-grandlyon-iodas-217747e5c449253ba22c3670ddcabedc07a0d051.zip
passerelle-grandlyon-iodas-217747e5c449253ba22c3670ddcabedc07a0d051.tar.gz
passerelle-grandlyon-iodas-217747e5c449253ba22c3670ddcabedc07a0d051.tar.bz2
remove obsolete/commented out code
-rw-r--r--grandlyon_iodas/models.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/grandlyon_iodas/models.py b/grandlyon_iodas/models.py
index a30cc08..2577697 100644
--- a/grandlyon_iodas/models.py
+++ b/grandlyon_iodas/models.py
@@ -34,7 +34,8 @@ def sudsobject_to_dict(sudsobject):
out[key] = value
return out
-class grandlyonIodas(BaseResource):
+
+class GrandlyonIodas(BaseResource):
token_url = models.URLField(_('Token URL'), max_length=256)
token_authorization = models.CharField(_('Token Authorization'), max_length=128)
wsdl_url = models.CharField(_('WSDL URL'), max_length=256) # not URLField, it can be file://
@@ -69,7 +70,6 @@ class grandlyonIodas(BaseResource):
HttpAuthenticated.__init__(self)
def send(self, request):
- #request.message = request.message.replace("contentType", "xm:contentType")
request.headers['Authorization'] = self.instance.get_token()
resp = self.instance.requests.post(request.url, data=request.message,
headers=request.headers,
@@ -120,18 +120,11 @@ class grandlyonIodas(BaseResource):
#nbProc = (len(data['procedurespa']['procedurespa']['procedurepa']) - 1) if 'procedurespa' in data else ''
procedures = []
nb = 0
- #print >> open('/home/grandlyon/marln/debug.test', 'a+'), "***** *****"
for proc in data['procedurespa']['procedurespa']['procedurepa'] :
- #print >> open('/home/grandlyon/marln/debug.test', 'a+'), foo
nb += 1
if (nb < len(data['procedurespa']['procedurespa']['procedurepa']) and proc['libl'] != data['procedurespa']['procedurespa']['procedurepa'][nb]['libl']) or nb == len(data['procedurespa']['procedurespa']['procedurepa']) :
test = proc['libl']
procedures.append(proc)
- #print >> open('/home/grandlyon/marln/debug.test', 'a+'), self.get_client().service.ODA_getProceduresPA()
return {'hash': force_text(hashlib.sha224(force_bytes(json.dumps(data))).hexdigest()),
- #'libl': data['procedurespa']['procedurespa']['procedurepa'][nbProc]['libl'] if 'procedurespa' in data else '',
- #'procedures': data['procedurespa']['procedurespa']['procedurepa'][nbProc] if 'procedurespa' in data else '',
- #'procedures': data['procedurespa']['procedurespa']['procedurepa'] if 'procedurespa' in data else '',
'procedures': procedures,
- #'etapes': sorted(data['procedurespa']['procedurespa']['procedurepa'][nbProc]['etapes']['etape'], key=lambda x: x['id'], reverse=True) if 'procedures' in data else '',
'found': 1 if 'procedurespa' in data else 0}