On Friday 05 January 2007 20:57, Jorge Godoy wrote:
"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).

Not working :( Any other hints why this doesn't work? I'll go to the sqlobject list also, but I've got the gut-feeling it is TGs fault.

Diez

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