[ZPT] Using the fmt parameter from DTML ?

Dieter Maurer dieter@handshake.de
Thu, 11 Apr 2002 20:35:01 +0200


Colin Fox writes:
 > .....
 > Cost per unit: <dtml-var expr="_.float(total_cost/total_units)" 
 > fmt=dollars-and-cents>
 > 
 > (from the Zope Book)
 > 
 > Doing it the python %.2f way will work, but ideally we'd want something
 > that would display in the appropriate currency, localized (commas,
 > periods, currency symbol, etc).
 > 
 > Is there a way to do this from ZPT, or do I have to create a python
 > script to do it for me?
I think, the "dollars-and-cents" will be available from the
module "modules/Products/PythonScripts/standard".

If you could not do it in DTML, use a Python Script for ZPT...


Dieter