[Zope] iterating through ids and getting their properties
Aaron Payne
aaron@aaronpayne.com
Thu, 28 Sep 2000 11:35:54 -0500
Hello all,
I have a list of ids which correspond to instances in a folder. I want to
iterate through the list and display their properties.
I get an attribute error when rendering the page.
<dtml-in pendlist>
<dtml-call "REQUEST.set('theContainer', _.getattr(transactionInstances,
_['sequence-item']))">
<dtml-with theContainer>
&dtml-targetcorp;
</dtml-with>
</dtml-in pendlist>
Where:
transactionInstances is the folder containing the instances
pendlist is the list of ids
targetcorp is an attribute of the instance
Can you give me a hint?
-Aaron
Error Type: AttributeError
Error Value:
Traceback (innermost last):
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /usr/local/etc/Zope2d/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 171,
in publish
File /usr/local/etc/Zope2d/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: History)
File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 112,
in call_object
(Object: History)
File /usr/local/etc/Zope2d/lib/python/OFS/DTMLMethod.py, line 172, in
__call__
(Object: History)
File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: History)
File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_In.py, line
691, in renderwob
(Object: pendlist)
File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: REQUEST.set('theContainer',_.getattr(transactionInstances,
_['sequence-item'])))
(Info: transactionInstances)
File <string>, line 0, in ?
File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_Util.py, line
129, in careful_getattr
AttributeError: (see above)