[ZPT] Help with ZPT, python, and zsql

Pim van Stam pim at vanstam.info
Wed Mar 2 04:21:58 EST 2005


On Tue, 2005-03-01 at 21:36 -0500, Tom Twyman wrote:
> I am trying to put together a Zope site with Zsql and ZPT.  Currently, I 
> have  a zpt that displays results from a zsql method (sqlvw_classes):
> 
> <tr tal:repeat="item here/sqlvw_classes" >
> 
> <td tal:content="item/classid">
> Class ID
> </td>
> <td tal:content="item/class_title">
> Class title
> </td>
> <td tal:content="item/class_length_hrs">
>   Class Hours
> </td>
> <td tal:content="item/class_price">
>   Class Price
> </td>
> <td tal:content="item/class_desc">
>   Class Desc
> </td>
> <td>
> <a href="fmclassedit classid=3" tal:define="classid item/classid">Edit this 
> class</a>
> </td>
> </tr>
> 

It should be like:
<a tal:define="classid item/classid"
   tal:attributes="href string:fmclassedit?classid=${classid}">
   Edit this class</a>

Regards,

Pim van Stam



More information about the ZPT mailing list