From ccf32aca442feae4c765fb6133c418b4e387f428 Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 5 Mar 2020 21:53:16 +0000 Subject: Fixed #8760 -- Changed ModelMultipleChoiceField to use invalid_list as a error message key. --- docs/internals/deprecation.txt | 2 ++ docs/ref/forms/fields.txt | 6 +++++- docs/releases/3.1.txt | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 580301436a..a4262af43b 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -64,6 +64,8 @@ details on these changes. * The ``length`` argument for ``django.utils.crypto.get_random_string()`` will be required. +* The ``list`` message for ``ModelMultipleChoiceField`` will be removed. + See the :ref:`Django 3.1 release notes ` for more details on these changes. diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index d2a0550a47..92c1af63d7 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -1255,7 +1255,7 @@ generating choices. See :ref:`iterating-relationship-choices` for details. * Normalizes to: A ``QuerySet`` of model instances. * Validates that every id in the given list of values exists in the queryset. - * Error message keys: ``required``, ``list``, ``invalid_choice``, + * Error message keys: ``required``, ``invalid_list``, ``invalid_choice``, ``invalid_pk_value`` The ``invalid_choice`` message may contain ``%(value)s`` and the @@ -1285,6 +1285,10 @@ generating choices. See :ref:`iterating-relationship-choices` for details. Same as :class:`ModelChoiceField.iterator`. +.. deprecated:: 3.1 + + The ``list`` message is deprecated, use ``invalid_list`` instead. + .. _iterating-relationship-choices: Iterating relationship choices diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index 18b40b3bcc..bbde94a34e 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -557,6 +557,9 @@ Miscellaneous * Calling ``django.utils.crypto.get_random_string()`` without a ``length`` argument is deprecated. +* The ``list`` message for :class:`~django.forms.ModelMultipleChoiceField` is + deprecated in favor of ``invalid_list``. + .. _removed-features-3.1: Features removed in 3.1 -- cgit v1.3