[Zope] SQL from ZPT

Geir Bækholt Geir Bækholt
Mon, 22 Apr 2002 22:16:05 +0200


Hello Chetan, 

Sunday, April 21, 2002, 20:39:56, you wrote:

CK> Hi all
CK> How can one call SQL methods from ZPT ?
CK> The information on the site does not have any examples.
CK> TIA
CK> Chetan

an example:


<div tal:repeat="results here/myZSQLmethod">
<p tal:content="results/FIELDNAME"> FIELDNAME-things come here </p>
</div>


or the same when passing parameters :

<div tal:repeat="results python:here.myZSQLmethod(param1 = foo ,
param2 = bar)">
<p tal:content="results/FIELDNAME"> FIELDNAME-things come here </p>
</div>


-- 
Geir Bækholt                       web-developer
geirh@funcom.com             funcom oslo | webdev-team