[Zope] Accessing ZSQL result object contents via python:repeat

andrew cooke andrew at acooke.org
Mon Oct 27 06:55:22 EST 2003


<slap/>thanks<slap/>andrew<slap/>

Ian Bicking said:

> On Sunday, October 26, 2003, at 03:12 PM, andrew cooke wrote:
>> I have an ZSQL result, which I am iterating over using tal:repeat.  I
>> can
>> access the column values using tal syntax like item/col1 and item/col2.
>> But how do I access thes values via Python?  I've tried
>> python:repeat['item'].col1, python:repeat['item'].col1(), and
>> python:repeat['item']['col1'], but none of those work.  What's the
>> magic
>> recipe?
>
> python: item.col1
>
> (You can slap yourself on the forehead now ;)
>
> --
> Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
>
>


-- 
http://www.acooke.org/andrew



More information about the Zope mailing list