#15775: Can't enter scientific notation in decimal fields
------------------------------------+----------------------
               Reporter:  gregthe1  |        Owner:  nobody
                   Type:  Bug       |       Status:  new
              Milestone:            |    Component:  Forms
                Version:  1.2       |     Severity:  Normal
             Resolution:            |     Keywords:
           Triage Stage:  Accepted  |    Has patch:  0
    Needs documentation:  0         |  Needs tests:  0
Patch needs improvement:  0         |
------------------------------------+----------------------
Changes (by carljm):

 * needs_better_patch:   => 0
 * component:  Uncategorized => Forms
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 The validation issue is a bug in `DecimalField`. `DecimalField` calls
 `value.as_tuple()` and unconditionally takes the absolute value of the
 third argument (`exponent`) as the number of decimal places. This is just
 wrong, because it's perfectly valid for exponent to be positive, and in
 that case it doesn't represent a number of decimal places at all, it
 represents trailing zeros.

 The other issue (quantize error) I can't reproduce and I don't think is
 related. Please open as a separate ticket with full reproduction
 instructions (including version of Python, since that's an error coming
 directly from Python's decimal module).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15775#comment:1>
Django <http://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