[Zope] something wrong with ZSQL

Samuele Giovanni Tonon samu at sferacarta.com
Tue Apr 27 05:53:34 EDT 2004


hi to all,

supposes you have a ZSQL method of this kind

select  table1.name, table1.lastname, table2.name, table2.lastname
from table1, table2
where table1.cod = table2.cod


with ZPT to see them on a table i'll use something like this:


<span tal:define="l_ppl python:container.SQLquery()">
<span tal:condition="python:len(l_ppl) > 0">
<table class=modifica>
<tr tal:repeat="num python:range(0,len(l_ppl.names()))">
<td span=1 tal:content="python:l_ppl.names()[num]">
Name
</td>
<td>
<input type=text tal:attributes="name python:l_ppl.names()[num];
value python:l_ppl[0][num]" >
</td>
</tr>
</table>
</span>
</span>

however this gives an error :

An error was encountered while publishing this resource.

Error Type: ValueError
Error Value: Duplicate column name, name


Am i wrong or this is a big problem of ZPT ? Is there a way
to force to user absolute name, instead of relatives ?

thanks
Samuele









More information about the Zope mailing list