[Zope] sum() produces floats not integers

Wayne Connolly wayne at c-media.com.au
Wed Sep 17 08:46:22 EDT 2003


Thanks so much Chris, there was a minor modification to get it working which
was the duplication of the python which im sure was just a typo...
. but it was perfect nonetheless. To remove the float from returned database
results ::: <span TAL:replace="python:'%0.f' % charts.plays">Plays</span>

cheers mate,

wayne
----- Original Message -----
From: "Chris Withers" <chrisw at nipltd.com>
To: <wayne at c-media.com.au>
Cc: <zope at zope.org>
Sent: Wednesday, September 17, 2003 10:03 PM
Subject: Re: [Zope] sum() produces floats not integers


> Try this:
>
> > PageTemplate
> > <TR bgcolor="#333333" tal:repeat="charts
> > here/getChartsMethod">
> > <span TAL:replace="charts/title">Title</span>
> > <span TAL:replace="python python:'%0.f' % charts.plays">Plays</span>
</TR>
>
> cheers,
>
> Chris
>




More information about the Zope mailing list