[Zope] Calling dynamic zsql method from zpt?

Ed Leafe ed at leafe.com
Fri Nov 28 18:52:40 EST 2003


On Nov 28, 2003, at 7:58 AM, Nick Bower wrote:

>>  What happens if you change the call to:
>>
>> <div tal:define="sqlRows
>> python:here.ZSQLTerritoryList(parent_id=parent_id)">
>
> Thanks.  But then why does zope go to the trouble of having a 
> "nocall:"?  Would multiple operations on subsequent sqlRows variables 
> not result in multiple queries in the above python implementation?  If 
> not, then I'm safe and it's exactly what I need :-)

	No, the query is run when the div statement defining it is processed. 
Subsequent references to sqlRows will work with the results tuple 
returned from the query.

      ___/
     /
    __/
   /
  ____/
  Ed Leafe

Linux Love:
unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep




More information about the Zope mailing list