[Zope] Defining a dictionary in ZPT?
michael nt milne
michael.milne at gmail.com
Thu Nov 1 15:36:45 EDT 2007
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
On 11/1/07, Paul Winkler <pw_lists at slinkp.com> wrote:
>
> On Thu, Nov 01, 2007 at 12:48:04PM +0000, michael nt milne wrote:
> > Hi
> >
> > I've got this piece of code which is returning a keyerror on 'results'
> as I
> > haven't set up a dictionary for the variables.
> (snip)
> > <span tal:define="query here/testquery">
> > <li tal content="results python: query(id='IT')">
> > <span tal:replace="results/firstname">First Name</span>
> > </li>
>
> "<li tal content" doesn't make any sense.
>
> I suspect you want that to be:
>
> <li tal:define="results ...
>
>
> --
>
> Paul Winkler
> _______________________________________________
> Zope maillist - Zope at zope.org
> 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 )
>
--
michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20071101/5a54e544/attachment.htm
More information about the Zope
mailing list