[Zope] ztp and dollars-and-cents

Tres Seaver tseaver at palladion.com
Thu Jan 15 22:39:39 EST 2009


-----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>



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJcAF7+gerLs4ltQ4RAoV/AKCJRt+c2abkS0uTI3K9ZteySIXpdQCfcFcB
NOxwqZ9TDUKEBWxIInqfDTA=
=twYJ
-----END PGP SIGNATURE-----



More information about the Zope mailing list