[Zope] ztp and dollars-and-cents
Miguel Beltran R.
yourpadre at gmail.com
Mon Jan 19 19:23:40 EST 2009
2009/1/15 Tres Seaver <tseaver at palladion.com>
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Miguel Beltran R. wrote:
> > dtml-var have dollars-and-cents to made show numbers this way
> 0,000,000.00
> > exist something to do the same with zpt tal:content ?
>
> You can use the same function, because it is imported into a "safe for
> import by untrusted code" module (Products.PythonScripts.standard). E.g.:
>
> <p tal:define="std modules/Products/PythonScripts/standard;
> tal:content="python: std.dollars_and_cents(value)">1.00</p>
>
>
> Thanks. I just modify to python: '<strong>' +
std.thousands_commas(std.dollars_and_cents(item.saldo))+ '</strong>' and
work excellent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20090119/6ea591bf/attachment.html
More information about the Zope
mailing list