yeah I have modified to this<br><br><span class="q"><li tal:define = "query here/testquery"
<br> tal:repeat="result python:query(id='IT')"><br></span><span class="q"><span tal:replace="python:repeat['result'].firstname">First Name</span>&nbsp;<br> </li>
<br><br>but get this as a result. Thanks for the reply.<br><br></span><span class="q"> Module
Products.PTProfiler.ProfilerPatch, line 32, in __patched_call__<br> Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__<br></span> - __traceback_info__: query(id='IT')<br> Module Python expression "query(id='IT')", line 1, in <expression>
<br>AttributeError: Results instance has no __call__ method<br><br><div><span class="gmail_quote">On 11/1/07, <b class="gmail_sendername">Paul Winkler</b> <<a href="mailto:pw_lists@slinkp.com">pw_lists@slinkp.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Thu, Nov 01, 2007 at 12:48:04PM +0000, michael nt milne wrote:<br>> Hi<br>><br>
> I've got this piece of code which is returning a keyerror on 'results' as I<br>> haven't set up a dictionary for the variables.<br>(snip)<br>> <span tal:define="query here/testquery">
<br>> <li tal content="results python: query(id='IT')"><br>> <span tal:replace="results/firstname">First Name</span>&nbsp;<br>> </li><br><br>"<li tal content" doesn't make any sense.
<br><br>I suspect you want that to be:<br><br><li tal:define="results ...<br><br><br>--<br><br>Paul Winkler<br>_______________________________________________<br>Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org
</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br><br clear="all"><br>-- <br>
michael