Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-20 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
-+-
 Reporter:  aleksey.kladov@… |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:
 Severity:  Normal   |  1.6-beta-1
 Keywords:   |   Resolution:
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  0|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by claudep):

 * stage:  Accepted => Ready for checkin


Comment:

 RFC, but please either add a comment about the rationale or refer to this
 ticket. Thanks!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.3b3fa6eb07d711ce75147b6bc4c35b53%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-19 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
-+-
 Reporter:  aleksey.kladov@… |Owner:  charettes
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:
 Severity:  Normal   |  1.6-beta-1
 Keywords:   |   Resolution:  fixed
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  0|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by Simon Charette ):

 In [changeset:"9d3f7a21a337aa82d5c9ac5ef9a6a3888bff62a8"]:
 {{{
 #!CommitTicketReference repository=""
 revision="9d3f7a21a337aa82d5c9ac5ef9a6a3888bff62a8"
 [1.6.x] Fixed #20765 -- Set small values of `step` using exponential
 notation.

 Browsers parse small factors of 10 as 0 under decimal notation.

 Thanks to Trac alias matklad for the report and Claude Paroz for the
 review.

 Backport of 415a36947c from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.7d4e086bc89c4c4466af36dc58a4d307%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-19 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
-+-
 Reporter:  aleksey.kladov@… |Owner:  charettes
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:
 Severity:  Normal   |  1.6-beta-1
 Keywords:   |   Resolution:  fixed
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  0|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by Simon Charette ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"415a36947cb4b8b61230698e13cca2df9400e245"]:
 {{{
 #!CommitTicketReference repository=""
 revision="415a36947cb4b8b61230698e13cca2df9400e245"
 Fixed #20765 -- Set small values of `step` using exponential notation.

 Browsers parse small factors of 10 as 0 under decimal notation.

 Thanks to Trac alias matklad for the report and Claude Paroz for the
 review.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.322b2eaa422bc0f82af78c29b73ef2fa%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-19 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  charettes
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by matklad):

 Looks perfect!

 As a bonus, exponential form improves html readability.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.096c96a0bae8d32a15cb105c4518ce4c%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-19 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  charettes
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by charettes):

 I think I've found a middleground. Parsing works flawlessly in
 [http://jsfiddle.net/cnSsU/12/ exponential form]. Submitting an updated
 patch.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.ae590591514d84a29cb341d5947449a3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  charettes
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by matklad):

 This looks good. I can see only one very minor caveat. If decimal_places=0
 then step is equal to any, while 1 seems more reasonable.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.a082e94f32ee101b9d04b58a6e0fa13e%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  charettes
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by charettes):

 * has_patch:  0 => 1


Comment:

 Added a patch that still sets `step` as '''default''' for `max_digits <=
 18` and `'any'` in the other case.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.372048a20b7211a7ee4c88857b2c6550%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  charettes
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by matklad):

 I would be completely happy if I could override `step`. But it's because I
 '''know''' that I have to override it. Let me try to convince you for the
 last time that guessing step is not a good idea. There will be three
 points.

 1. Suppose I know nothing about this issue and just wrote in one of my
 forms `number = fields.DecimalField(max_digits=50, decimal_places=25)`. I
 use firefox and the form is working OK in it. Moreover, tests are working
 too. However, very soon I get a bug report that it's impossible to use
 non-integer numbers in Chrome! So I have to look into the source of the
 page, notice suspicious `step="0.0001"`, and find
 out that it is the reason of strange behaviour. Next, I have to look
 inside django's source, to find out, from where this `step` emerges. And
 only then I realize that I need to override it.

 2. Current default can produce invalid html.

 The step attribute, if specified, must either have a value that is a
 '''valid floating-point number that parses to a number that is greater
 than zero''', or must have a value that is an ASCII case-insensitive match
 for the string "any".

 3. If I close my eyes, forget about everything in the universe and ask
 myself, "what is the most reasonable default for `step`?" I hear a voice
 whispering "`any`".


 Also, this issue can show more often than it seems. 10^-18^ is quit a
 little number, and it looks like most users won't use such a high
 precision. However, it is the '''Decimal'''Field. And if someone is using
 a Decimal instead of Float, it means that he cares about high precision.
 So it's rather likely that he uses many decimal places. Also, python's
 default prec for decimals is 28 places!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.8962dc583331d6ddc1bd59b70798ae8f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  charettes
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by charettes):

 * owner:  nobody => charettes
 * status:  new => assigned


Comment:

 I'll write a patch and fix tests for the `setdefault` behavior.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.19f2cda4d4c4c1b85af3edb85e343878%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by claudep):

 What's definitely a bug is that `step` is not overridable.

 As of the number of decimal places, it's browser-dependant, and I'm less
 enthousiast to do something about it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.22580fe3148ccf7a16dc8f7f4b6295ae%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by matklad):

 `setdefult` defenetelly should be there.

 However I think that it's still worth to check that decimal_places <= 18
 and use `any` as a default otherwise(or just always use `any`).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.f80d84c0e165356cfeaf3479945d5cb2%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by charettes):

 I guess we should use `setdefault` here instead of direct assignment.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.e2e55b16d7b664b2520392fd0bb9252a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by matklad):

 > the default step attribute is still overridable
 Not really, look again at
 https://github.com/django/django/blob/stable/1.6.x/django/forms/fields.py#L374

 Even if I do
 {{{
 answer = fields.DecimalField(max_digits=50,
  decimal_places=25,
  widget=NumberInput(attrs={"step": "any"}))
 }}}

 the step gets overriden.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.386ece2fafa017fb019f3453e32ca985%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by charettes):

 * severity:  Release blocker => Normal


Comment:

 It [http://jsfiddle.net/cnSsU/7/ seems to work until] 1^-18^.

 IMHO [http://www.w3.org/TR/2012/WD-html5-20121025/common-
 microsyntaxes.html#rules-for-parsing-floating-point-number-values the
 float parsing algorithm] is quite unambiguous and the default `step`
 attribute is still overridable. I think we should be safe assuming our
 `step` generation mechanism works for `decimal_places <= 18`.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.4660ed3207a9b97fefee51de2ea929e3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by anonymous):

 >Do you know the exact value for big?

 No, I'm not an IEEE 754 expert =(

 >We could attempt defaulting step to the current behavior when
 decimal_place < big and fallback to any just how `FloatField` does.

 I think that step > 0.001 is anyway useless in general. May be just
 `.setdefault("step", "any")` exactly as in FloatField? In the face of
 ambiguity, refuse the temptation to guess.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.3f5315615ee4d33763952b1e6c333953%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+--
 Reporter:  aleksey.kladov@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.6-beta-1
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by charettes):

 * severity:  Normal => Release blocker
 * cc: charettes (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 We shouldn't add a `step` argument to `DecimalField` since it only concern
 the `widget`.

 Do you know the exact value for `big`?

 We could attempt defaulting `step` to the current behavior when
 `decimal_place < big` and fallback to `any` just how
 [https://github.com/django/django/blob/stable/1.6.x/django/forms/fields.py#L286
 `FloatField`] does.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/082.0187d84b48d9289b79be0695ef0fec0a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #20765: HTML5 number input type not working for DecimalField with big decimal_places

2013-07-18 Thread Django
#20765: HTML5 number input type not working for DecimalField with big
decimal_places
--+
 Reporter:  aleksey.kladov@…  |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Forms |Version:  1.6-beta-1
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 DecimalFiled's widget is a NumberInput with step attribute equal to
 10^-decimal_placecese^.
 
https://github.com/django/django/blob/stable/1.6.x/django/forms/fields.py#L374).

 If decimal_places is too big(the exact value for `big` should be found
 here http://www.w3.org/TR/2012/WD-html5-20121025/common-microsyntaxes.html
 #rules-for-parsing-floating-point-number-values) the step value parses to
 0, which is not valid (http://www.w3.org/TR/2012/WD-html5-20121025/common-
 input-element-attributes.html#attr-input-step). It is not good in itself,
 but it also causes surprising and unwanted behaviour.

 For example in Google Chrome input with type="number" and
 step="0.001" accepts only integer values!

 A possible  fix is to add optional `step` argument to DecimalField and,
 and if it is not provided just use "any".

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.ea1b1575606673fcc2033a624ab92cb8%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.