I wrote my own function to convert since I couldn't find a Django
filter or Python library to do so.  I convert to a summary style
format instead of full-precision currency:

  if abs(what_number) > 1000000000:
    return_string = str(round(float(what_number)/1000000000,places)) +
"B"
  elif abs(what_number) > 1000000:
    return_string = str(round(float(what_number)/1000000,places)) +
"M"
  elif abs(what_number) > 1000:
    return_string = str(round(float(what_number)/1000,places)) + "K"
  else:
    return_string = str(round(float(what_number),places))

Hope that helps.
w.

On Jan 2, 5:31 pm, Shay Ben Dov <shay.ben...@gmail.com> wrote:
> Hi,
> Anyone knows how to implement in GAE
> currency formating of floating numbers like:
> {{ value|floatformat:2 }} built_in filter
> Shay
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to