"Diez B. Roggisch" <[EMAIL PROTECTED]> writes:

today I stumbled over the fact that my SQLObject columns of type CurrencyCol
don't return decimal-Objects - which is crucial for my application.

Now the SO-docs state that it works when first importing module decimal, and
then the DB-adapter. I certainly did the former in my model.py, yet to no
avail.

It _should_ work with SO and postgres, so I presume a TG issue. Any hints?

Use DecimalCol directly.  Here, for money I tend to use:

   value = DecimalCol(size=19, precision=4)


That is: 19 digits being 4 after the comma (so I have 15 digits before and 4
after the comma -- it is better having more precision here to make more
accurate calculations but the laws in your country may vary with regards to
that).

--
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to