Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

ztp and dollars-and-cents

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


yourpadre at gmail

Jan 15, 2009, 7:18 PM

Post #1 of 3 (1139 views)
Permalink
ztp and dollars-and-cents

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 ?

--
________________________________________
Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida


tseaver at palladion

Jan 15, 2009, 7:39 PM

Post #2 of 3 (1064 views)
Permalink
Re: ztp and dollars-and-cents [In reply to]

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

_______________________________________________
Zope maillist - Zope [at] zope
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


yourpadre at gmail

Jan 19, 2009, 4:23 PM

Post #3 of 3 (1049 views)
Permalink
Re: ztp and dollars-and-cents [In reply to]

2009/1/15 Tres Seaver <tseaver [at] palladion>

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

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.