Hi Michael
michael nt milne schrieb:
yeah I have modified to this
<li tal:define = "query here/testquery"
tal:repeat="result python:query(id='IT')">
<span tal:replace="python:repeat['result'].firstname">First
Name</span>
</li>
but get this as a result. Thanks for the reply.
Module Products.PTProfiler.ProfilerPatch, line 32, in __patched_call__
Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
- __traceback_info__: query(id='IT')
Module Python expression "query(id='IT')", line 1, in <expression>
AttributeError: Results instance has no __call__ method
I suspect that result isn't a dictionary. Why don't you try to print
result instead and see its type? Try this:
<span tal:replace="repeat/result"></span>
You could also try the other sintax for your zpt:
<span tal:replace="repeat/result/firstname">First Name</span>
Regards
Josef
_______________________________________________
Zope maillist - [email protected]
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 )