1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #19686 -- Added HTML5 number input type

Thanks Simon Charette for his help on the patch. Refs #16630.
This commit is contained in:
Claude Paroz
2013-02-23 09:45:56 +01:00
parent dcf651c27e
commit 7ec2a21be1
12 changed files with 148 additions and 67 deletions

View File

@@ -60,9 +60,13 @@ Minor features
* In addition to :lookup:`year`, :lookup:`month` and :lookup:`day`, the ORM
now supports :lookup:`hour`, :lookup:`minute` and :lookup:`second` lookups.
* The default widgets for :class:`~django.forms.EmailField` and
:class:`~django.forms.URLField` use the new type attributes available in
HTML5 (type='email', type='url').
* The default widgets for :class:`~django.forms.EmailField`,
:class:`~django.forms.URLField`, :class:`~django.forms.IntegerField`,
:class:`~django.forms.FloatField` and :class:`~django.forms.DecimalField` use
the new type attributes available in HTML5 (type='email', type='url',
type='number'). Note that due to erratic support of the ``number`` input type
with localized numbers in current browsers, Django only uses it when numeric
fields are not localized.
* The ``number`` argument for :ref:`lazy plural translations
<lazy-plural-translations>` can be provided at translation time rather than
@@ -122,7 +126,8 @@ Backwards incompatible changes in 1.6
* If your CSS/Javascript code used to access HTML input widgets by type, you
should review it as ``type='text'`` widgets might be now output as
``type='email'`` or ``type='url'`` depending on their corresponding field type.
``type='email'``, ``type='url'`` or ``type='number'`` depending on their
corresponding field type.
* Extraction of translatable literals from templates with the
:djadmin:`makemessages` command now correctly detects i18n constructs when