ok, thanks Duncan<br><br>   &lt;ul&gt;<br>&lt;li tal:define=&quot;query nocall:here/testquery&quot; tal:repeat=&quot;result python:query(id=&#39;IT&#39;)&quot;&gt;<br>&lt;span tal:replace=&quot;result/lastname&quot;&gt;lastname goes here&lt;/span&gt;
<br><br> &lt;/li&gt;<br>&lt;/ul&gt;<br><br>works! I went down a blind alley with calling the database adapter due to confusion over the error message produced. Backs up my point about more friendly and usable error messages.
<br><br>Much appreciated!<br><br><div><span class="gmail_quote">On 11/2/07, <b class="gmail_sendername">Duncan Booth</b> &lt;<a href="mailto:duncan.booth@suttoncourtenay.org.uk">duncan.booth@suttoncourtenay.org.uk</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
&quot;michael nt milne&quot; &lt;<a href="mailto:michael.milne@gmail.com">michael.milne@gmail.com</a>&gt;<br>wrote:<br><br>&gt;&lt;li tal:define = &quot;query here/testquery&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tal:repeat=&quot;result python:query(id=&#39;IT&#39;)&quot;&gt;
<br>&gt;&lt;span tal:replace=&quot;python:repeat[&#39;result&#39;].firstname&quot;&gt;First<br>&gt; Name&lt;/span&gt;&amp;nbsp;<br>&gt;&nbsp;&nbsp;&lt;/li&gt;<br>&gt;<br>&gt; but get this as a result. Thanks for the reply.<br>&gt;<br>
&gt; Module Products.PTProfiler.ProfilerPatch, line 32, in __patched_call__<br>&gt; Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__<br>&gt; - __traceback_info__: query(id=&#39;IT&#39;)<br>&gt; Module Python expression &quot;query(id=&#39;IT&#39;)&quot;, line 1, in &lt;expression&gt;
<br>&gt; AttributeError: Results instance has no __call__ method<br><br>That is because you already called the function.<br><br>The tal:define=&quot;query here/testquery&quot; is (roughly) equivalent to:<br>tal:define=&quot;query python:
here.testquery()&quot;. If you want to use a path<br>expression which evaluates to something callable so that you have a shorter<br>name later when you call it then you explicitly say you don&#39;t want to call<br>it:<br>
<br>&nbsp;&nbsp; tal:define=&quot;query nocall:here/testquery&quot;<br><br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<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>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<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