[Zope] Calling dynamic zsql method from zpt?

Nick Bower nicholas.bower at jrc.it
Fri Nov 28 07:58:35 EST 2003


> > What I need is something like this:
> >
> > <div tal:define="sqlRows 
> > nocall:here/ZSQLTerritoryList(parent_id=parent_id)">
> >   <select name="country_list">
> >   <option value="">ANY</option>
> >   <option tal:repeat="sqlRow sqlRows" ...
> >   etc...
> >
> > but obviously the first line of code doesn't work.  How else are 
> > variables passed do zsql methods from page templates?
> 
> 	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 :-)




-- 

Nick Bower Ph.D.
Cybersecurity Sector
Institute for the Protection and Security of the Citizen
European Commission Joint Research Centre

TP 267
Via Enrico Fermi 1
Ispra 
21020 VA
Italy

nicholas.bower at jrc.it
tel:+39 0332786679
fax:+39 0332789576

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20031128/21b1a37c/attachment.html


More information about the Zope mailing list