[ZPT] Re: tal:repeat problem

Tonico Strasser contact_tonico at yahoo.de
Fri May 28 13:59:02 EDT 2004


Tonico Strasser wrote:
> 
> <table tal:define="items python: 1000;
>                    cols python: 12;
>                    remainder python: items % cols;
>                    rows python: items / cols;
>                    rows python: test(remainder, rows + 1, rows);">
>   <tr tal:repeat="row python: range(rows);">
>     <td tal:define="start python: cols * row;
>                     end python: start + cols;"
>         tal:repeat="item python: range(start, end);"
>         tal:content="python: test(item <= items, item, 'x');"/>
>   </tr>
> </table>

-         tal:content="python: test(item <= items, item, 'x');"/>
+         tal:content="python: test(item < items, item, 'x');"/>

Small correction :-)

Tonico




More information about the ZPT mailing list