#16630: Support for HTML5 input types -------------------------+---------------------------- Reporter: jonash | Owner: nobody Type: New feature | Status: new Milestone: | Component: Forms Version: SVN | Severity: Normal Keywords: html5 | Triage Stage: Unreviewed Has patch: 1 | Easy pickings: 0 UI/UX: 0 | -------------------------+---------------------------- I attached a patch that adds support for HTML5 input types (URL, e-mail, number).
New widgets: * `IntegerInput` -- HTML5 `type="number"` * `URLInput` -- HTML5 `type="url"` * `EmailInput` -- HTML5 `type="email"` Changes to fields: * `EmailField`: Uses `EmailInput` * `URLField`: Uses `URLInput` * `IntegerField`: Uses `IntegerInput`, adds the `max="..."` and `min="..."` HTML5 `attrs` if `max_value`/`min_value` are specified * `FloatField`: inherits behaviour from `IntegerField` and adds `step="any"` * `DecimalFields`: Now based on `IntegerField` because they share code; also `maxlength="..."` and `step="..."` are set accordingly The second patch that is attached adapts the tests accordingly. (Some HTML attribute reordering was neccessary because of Python's dict ordering behaviour.) -- Ticket URL: <https://code.djangoproject.com/ticket/16630> 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.