#17854: Problem with DecimalField and big vlues of max_digits, decimal_places,
sqlite3 backend
-------------------------------------+-------------------------------------
     Reporter:  anonymous            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  DecimalField bug     |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Old description:

> For a model field created as :: models.DecimalField(max_digits = 200,
> decimal_places = 100, blank = False, null = False)
> While using admin interface to insert a record involving such a
> DecimalField, the format changes (loss of precision and it uses
> scientific notation (even in the database)) (Please note - it works
> properly for low precision values (example - .987654321001234) - but for
> larger precision values (probably 15 decimal_places or more) it results
> in loss of precision)
>
> django version 1.3.1 and 1.4c1 (don't know about older versions);
> python 2.6.6;
> linux;

New description:

 For a model field created as
 {{{
 models.DecimalField(max_digits = 200, decimal_places = 100, blank = False,
 null = False)
 }}}

 While using admin interface to insert a record involving such a
 !DecimalField, the format changes (loss of precision and it uses
 scientific notation (even in the database)) (Please note - it works
 properly for low precision values (example - .987654321001234) - but for
 larger precision values (probably 15 decimal_places or more) it results in
 loss of precision)

 * django version 1.3.1 and 1.4c1 (don't know about older versions);
 * python 2.6.6;
 * linux;

--

Comment (by ramiro):

 Would be acceptable to "fix" this by documenting the limitations of the
 three database engine/adaptors in the DB notes document?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17854#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to