What is the Right Way to handle DECIMAL fields?

2006-08-29 Thread Andrew Durdin
In a project I am working on, we need to store monetary values in the database, and we want to avoid floats altogether so that we don't lose precision or have representation errors. The existing FloatField was not suitable for use, because it would sometimes return floats and sometimes decimals, d

Re: What is the Right Way to handle DECIMAL fields?

2006-08-29 Thread Malcolm Tredinnick
On Tue, 2006-08-29 at 16:46 +, Andrew Durdin wrote: [...] > To quote from what I wrote in the ticket: > > > Finally, this patch should work without the decimal module: if the > > decimal module is available, then models.DecimalField? attributes will > > be decimal.Decimal instances; if not, t

Re: What is the Right Way to handle DECIMAL fields?

2006-09-05 Thread Carlo C8E Miron
On 8/29/06, Andrew Durdin <[EMAIL PROTECTED]> wrote: > In a project I am working on, we need to store monetary values in the > database, and we want to avoid floats altogether so that we don't lose > precision or have representation errors. The existing FloatField was > not suitable for use, becau

Re: What is the Right Way to handle DECIMAL fields?

2006-09-08 Thread jorjun
Andrew Durdin wrote: The problem with the latter is that the decimal module is only > in 2.4, and django is targeting 2.3 as the minimum support version of > Python. My background is in over ten years of business application development (order processing and ERP), and I have been moving over to D