# HG changeset patch # User casties # Date 1329982428 -3600 # Node ID 48ed91b2978435fc2812316592a3663b34bea79d # Parent 5b99c04c567c2c45ad1cb8471457aa2bc28b1a5c added stuff from RestDbGisApi to WritableRestDbInterface. changed meta_type of RestDbInterface (remove "2"). diff -r 5b99c04c567c -r 48ed91b29784 RestDbInterface.py --- a/RestDbInterface.py Wed Feb 22 18:53:05 2012 +0100 +++ b/RestDbInterface.py Thu Feb 23 08:33:48 2012 +0100 @@ -27,7 +27,7 @@ """ implements(IPublishTraverse) - meta_type="RESTdb2" + meta_type="RESTdb" manage_options=Folder.manage_options+( {'label':'Config','action':'manage_editRestDbInterfaceForm'}, ) diff -r 5b99c04c567c -r 48ed91b29784 WritableRestDbInterface.py --- a/WritableRestDbInterface.py Wed Feb 22 18:53:05 2012 +0100 +++ b/WritableRestDbInterface.py Thu Feb 23 08:33:48 2012 +0100 @@ -231,14 +231,30 @@ colNodes=node[1].getElementsByTagNameNS(namespace, colTagName) data = [] hasData = False + # TODO: check this index stuff + lineIndex=0 for colNode in colNodes: + lineIndex+=1 dataNodes=colNode.getElementsByTagNameNS(namespace, dataTagName) if len(dataNodes) > 0: - val = getTextFromNode(dataNodes[0]) - hasData = True + dataIndex=0 + if colNode.hasAttribute(u'ss:Index'): + dataIndex=int(colNode.getAttribute(u'ss:Index')) + while dataIndex>lineIndex: + data.append(None) + lineIndex+=1 + else: + val = getTextFromNode(dataNodes[0]) + hasData = True else: val = None - + + # TODO: check this + if val!=None: + a=val.rfind('.0') + b=len(val) + if a==b-2: + val=val.rpartition('.')[0] data.append(val) if not hasData: diff -r 5b99c04c567c -r 48ed91b29784 version.txt --- a/version.txt Wed Feb 22 18:53:05 2012 +0100 +++ b/version.txt Thu Feb 23 08:33:48 2012 +0100 @@ -1,1 +1,1 @@ -1.5 \ No newline at end of file +1.6 \ No newline at end of file