#32559: Add attribute 'step' to FloatField and DecimalField
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: nobody
Rief |
Type: New | Status: new
feature |
Component: Forms | Version: dev
Severity: Normal | Keywords: FloatField,
Triage Stage: | NumberInput, step
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
If someone wants to use the `step` attribute as provided by the HTML field
`<input type="number" ...>` , she/he has to specify that using for
instance
`FloatField(widget=NumberInput(attrs={'step': 0.5}))`.
Since the HTML standard offers a `step` attribute on input fields of
`type="number"`,
this feature shall be reflected by Django's `FloatField` and optionally
`DecimalField`,
rather than having to parametrize the widget.
Min- and max-values are already supported by the `FloatField`, so the
step-value
would make sense here as well. It furthermore would require to revalidate
the
step-value by Django's Form validation, rather than by HTML alone.
--
Ticket URL: <https://code.djangoproject.com/ticket/32559>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.acdb13eb03da83bbb4e277126834d865%40djangoproject.com.