On Tue, Jan 14, 2014 at 7:23 AM, Eric Rouleau wrote:
> The problem seems to be in the postgres backend or Psycopg 2.5.2 adapter...
> I have the same problem and the data in postgres is 0. but when
> fetched by django it comes up as Decimal("0E-8") (with shell access not only
> admin), if I
The problem seems to be in the postgres backend or Psycopg 2.5.2 adapter...
I have the same problem and the data in postgres is 0. but when
fetched by django it comes up as Decimal("0E-8") (with shell access not
only admin), if I switch to sqlite3 backend then it works perfectly
On Thur
On Wed, Jan 8, 2014 at 10:42 PM, Dennis Lee Bieber wrote:
> If Django's "DecimalField" is NOT use Python's Decimal type, I'd be
>
concerned... Python's Decimal is NOT a "float".
>
> However, the conversion of a Decimal to/from PostgreSQL might
> result in
> a floating point value
On Thursday, January 9, 2014 7:37:43 AM UTC+11, Timothy W. Cook wrote:
>
>
> On Wed, Jan 8, 2014 at 6:07 PM, Erik Cederstrand
>
> > wrote:
>
>> Den 08/01/2014 kl. 17.56 skrev Daniel Roseman
>>
>> >:
>>
>
> >
>> But to post the solution to the issue, just for completeness.
>>
>
> Yes, Djan
On Wed, Jan 8, 2014 at 6:07 PM, Erik Cederstrand
wrote:
> Den 08/01/2014 kl. 17.56 skrev Daniel Roseman :
> >
>
> Greatly embarrassed, and thanks for clarifying. Will be more careful when
> answering next time :-)
>
> Erik
>
>
Well, Erik. I appreciate you answering even if it wasn't 100% accurate
Den 08/01/2014 kl. 17.56 skrev Daniel Roseman :
>
> No, no, no. None of this is true.
>
> Decimals are not a differently-formatted version of floats. Decimals are not
> a built-in datatype in Python, it's true, but they are provided in the
> standard library in (not surprisingly) the `decimal`
On Wed, Jan 8, 2014 at 2:56 PM, Daniel Roseman wrote:
>
> No, no, no. None of this is true.
>
> Decimals are not a differently-formatted version of floats. Decimals are
> not a built-in datatype in Python, it's true, but they are provided in the
> standard library in (not surprisingly) the `decima
On Wednesday, 8 January 2014 16:47:52 UTC, Erik Cederstrand wrote:
>
> Den 08/01/2014 kl. 17.11 skrev Timothy W. Cook >:
>
>
> > But one would think that if Django calls it a decimal field, it would
> convert the float to decimal.
> > I suppose I'll do that before writing it out to the file (a
Den 08/01/2014 kl. 17.11 skrev Timothy W. Cook :
> But one would think that if Django calls it a decimal field, it would convert
> the float to decimal.
> I suppose I'll do that before writing it out to the file (an XML schema) so
> it really isn't a big deal, just surprising.
Ah, the “decimal
On Wed, Jan 8, 2014 at 1:44 PM, Erik Cederstrand
wrote:
> Den 08/01/2014 kl. 16.18 skrev Timothy W. Cook :
>
>
> > So, why doesn't it just store a zero?
>
> Underneath a DecimalField there is a Python float type, and some
> equivalent float type in your database. Float values are an approximation
Den 08/01/2014 kl. 16.18 skrev Timothy W. Cook :
> I have several decimal fields defined in the model like this:
>
> min_inclusive = models.DecimalField(_('minimum inclusive'), max_digits=19,
> decimal_places=10, help_text=_("Enter the minimum (inclusive) value for this
> concept."), null=True,
I have several decimal fields defined in the model like this:
min_inclusive = models.DecimalField(_('minimum inclusive'), max_digits=19,
decimal_places=10, help_text=_("Enter the minimum (inclusive) value for
this concept."), null=True, blank=True)
Via the admin interface when I enter a 0 (zero)
12 matches
Mail list logo