Hi, i have to call a method of a package from a ZPT.
In Zope2, i make the Poll Product (Dev_Guide 2_4). In the example i can call "getVotesFor" method simply writing in ZPT (in ZMI) this line:

<span tal:replace="python:context.poll1.getVotesFor(j)"/>

and it works

In Zope3, i made the same product (package). From a ZPT page (in ZMI), i can call a method of Poll if the method don't take arguments, for example with:

<span tal:replace="context/poll1/getQuestion">

where poll1 is an istance of Poll package and it is in the same folder of the ZPT page. This works because the method don't take arguments, i just wan't call a method with parameters in Zope3, writing something like:

<span tal:replace="python:context.poll1.getVotesFor(j)"/>

Please help me.

Chiacchiera con i tuoi amici in tempo reale!

Zope3-users mailing list

Reply via email to