[Zope] Loop throught empty list returned by python-script
Sven Hohage
hohage@muenster.de
Sun, 30 Dec 2001 16:54:01 +0100
Hello,
a DTML-Method should iterate through a list which a python-script called
"attributeDecider" is returning
<dtml-in "attributeDecider(attribute)">
<dtml-var id>
</dtml-in>
this is the python-script:
objects = context.objectValues('Folder')
liste = []
for object in objects:
if hasattr(object,attribute) and object.attribute:
liste.append(object)
return liste
-->attribute is a boolean attribute and everything works fine except that
"attribute" is false -->
Zope is not rendering an empty page but it's trying to download the page
when I click on "view" in the ZMI
When I change <dtml-in "attributeDecider(attribute)"> to <dtml- var
"attributeDecider"> Zope shows an empty list-symbol (like expected).
Thanks for your patience for this end-of-year-problem and Happy New Year!!