File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,10 @@ For each field, we describe the default widget used if you don't specify
467
467
The ``max_value`` and ``min_value`` error messages may contain
468
468
``%(limit_value)s``, which will be substituted by the appropriate limit.
469
469
470
+ .. versionchanged:: 1.6
471
+ Similarly, the ``max_digits``, ``max_decimal_places`` and
472
+ ``max_whole_digits`` error messages may contain ``%(max)s``.
473
+
470
474
Takes four optional arguments:
471
475
472
476
.. attribute:: max_value
@@ -1013,6 +1017,11 @@ objects (in the case of ``ModelMultipleChoiceField``) into the
1013
1017
The empty and normalized values were changed to be consistently
1014
1018
``QuerySets`` instead of ``[]`` and ``QuerySet`` respectively.
1015
1019
1020
+ .. versionchanged:: 1.6
1021
+ The ``invalid_choice`` message may contain ``%(value)s`` and the
1022
+ ``invalid_pk_value`` message may contain ``%(pk)s``, which will be
1023
+ substituted by the appropriate values.
1024
+
1016
1025
Allows the selection of one or more model objects, suitable for
1017
1026
representing a many-to-many relation. As with :class:`ModelChoiceField`,
1018
1027
you can use ``label_from_instance`` to customize the object
Original file line number Diff line number Diff line change @@ -423,6 +423,13 @@ Miscellaneous
423
423
``type='email'``, ``type='url'`` or ``type='number'`` depending on their
424
424
corresponding field type.
425
425
426
+ * Form field's :attr:`~django.forms.Field.error_messages` that contain a
427
+ placeholder should now always use a named placeholder (``"Value '%(value)s' is
428
+ too big"`` instead of ``"Value '%s' is too big"``). See the corresponding
429
+ field documentation for details about the names of the placeholders. The
430
+ changes in 1.6 particularly affect :class:`~django.forms.DecimalField` and
431
+ :class:`~django.forms.ModelMultipleChoiceField`.
432
+
426
433
Features deprecated in 1.6
427
434
==========================
428
435
You can’t perform that action at this time.
0 commit comments