[Zope] folder.objectValues() help

BZ bz at bwanazulia.com
Mon Aug 18 14:42:03 EDT 2003


That worked like a charm.... (two charms, since I used it in two places).

Thanks very much.

BZ

> BZ wrote:
>
>>I would like to get back a list of objects, from a folder that have a
>>parameter checked off in them:
>>
>>So, I would like to get back a list of items "Item Name" that also have
>>been approved (check box value)
>>
>>
>>
> You can use list comprehensions to do this (untested):
>
> <dtml-in "[item for item in folder.objectValues('Item Name') if
> item.approved]">
>
> </dtml-in>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>




More information about the Zope mailing list