On Thursday 10 November 2005 19:55, John Smith wrote:
> I then created a nice page template which contains
> this snippet:
> <div tal:content="python:context.getTotalDistance()"
> where context is the Car object.
This is wrong, because Car does not have a function called getTotalDistance.
In the view class do:
total = interfaces.IDistanceTotal(self.context)
In the view do:
<div tal:content="view/getTotalDistance" />
Note that you should never ever put a python call into your template.
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list