summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-08-02 18:33:18 -0400
committerTim Graham <timograham@gmail.com>2014-08-03 11:21:01 -0400
commit0f2ceee0254349ee4ac7d472d3efe67ee161a917 (patch)
tree557f664c5fc08c1b85f213b62c98f1ad776a7bf1 /docs
parent44169a00c1fe7c130a8b9774e3b02ccce524a3eb (diff)
Fixed #23151 -- Deprecated RegexField.error_message.
Thanks Baptiste Mispelon for the suggestion.
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt2
-rw-r--r--docs/ref/forms/fields.txt11
-rw-r--r--docs/releases/1.8.txt6
3 files changed, 15 insertions, 4 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index f1cdfdb6be..795e46f8f0 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -40,6 +40,8 @@ about each item can often be found in the release notes of two versions prior.
* ``django.template.resolve_variable`` will be removed.
+* The ``error_message`` argument of ``django.forms.RegexField`` will be removed.
+
.. _deprecation-removed-in-1.9:
1.9
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index e92013a832..7dd0510237 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -805,10 +805,13 @@ For each field, we describe the default widget used if you don't specify
Also takes ``max_length`` and ``min_length``, which work just as they do for
``CharField``.
- The optional argument ``error_message`` is also accepted for backwards
- compatibility. The preferred way to provide an error message is to use the
- ``error_messages`` argument, passing a dictionary with ``'invalid'`` as a key
- and the error message as the value.
+ .. deprecated:: 1.8
+
+ The optional argument ``error_message`` is also accepted for backwards
+ compatibility but will be removed in Django 2.0. The preferred way to
+ provide an error message is to use the :attr:`~Field.error_messages`
+ argument, passing a dictionary with ``'invalid'`` as a key and the error
+ message as the value.
``SlugField``
~~~~~~~~~~~~~
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index a03b37c505..07dd783d0b 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -625,3 +625,9 @@ The function has been informally marked as "Deprecated" for some time. Replace
It provided the :ttag:`lorem` template tag which is now included in the
built-in tags. Simply remove ``'django.contrib.webdesign'`` from
:setting:`INSTALLED_APPS` and ``{% load webdesign %}`` from your templates.
+
+``error_message`` argument to ``django.forms.RegexField``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It provided backwards compatibility for pre-1.0 code, but its functionality is
+redundant. Use ``Field.error_messages['invalid']`` instead.