summaryrefslogtreecommitdiff
path: root/docs/ref/forms
diff options
context:
space:
mode:
authorVytis Banaitis <vytis.banaitis@gmail.com>2017-01-20 23:04:05 +0200
committerTim Graham <timograham@gmail.com>2017-01-26 08:19:27 -0500
commitd1bab24e0144d14513a1411503c95ececb425188 (patch)
tree187452bf7b66a9600abc47570ccae22e6d539ede /docs/ref/forms
parent888c1e9bfe49135d049cbdcbbb0f2e97a1a0a1f5 (diff)
Refs #23919, #27778 -- Removed obsolete mentions of unicode.
Diffstat (limited to 'docs/ref/forms')
-rw-r--r--docs/ref/forms/api.txt8
-rw-r--r--docs/ref/forms/fields.txt26
2 files changed, 16 insertions, 18 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
index e64e25d241..fda7472105 100644
--- a/docs/ref/forms/api.txt
+++ b/docs/ref/forms/api.txt
@@ -112,7 +112,7 @@ messages::
{'sender': ['Enter a valid email address.'], 'subject': ['This field is required.']}
In this dictionary, the keys are the field names, and the values are lists of
-Unicode strings representing the error messages. The error messages are stored
+strings representing the error messages. The error messages are stored
in lists because a field can have multiple error messages.
You can access :attr:`~Form.errors` without having to call
@@ -357,8 +357,8 @@ it, you can access the clean data via its ``cleaned_data`` attribute::
{'cc_myself': True, 'message': 'Hi there', 'sender': 'foo@example.com', 'subject': 'hello'}
Note that any text-based field -- such as ``CharField`` or ``EmailField`` --
-always cleans the input into a Unicode string. We'll cover the encoding
-implications later in this document.
+always cleans the input into a string. We'll cover the encoding implications
+later in this document.
If your data does *not* validate, the ``cleaned_data`` dictionary contains
only the valid fields::
@@ -490,7 +490,7 @@ Notice the following:
Although ``<table>`` output is the default output style when you ``print`` a
form, other output styles are available. Each style is available as a method on
-a form object, and each rendering method returns a Unicode object.
+a form object, and each rendering method returns a string.
``as_p()``
----------
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 2949ad0a9b..341d142c4b 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -88,9 +88,8 @@ To specify that a field is *not* required, pass ``required=False`` to the
If a ``Field`` has ``required=False`` and you pass ``clean()`` an empty value,
then ``clean()`` will return a *normalized* empty value rather than raising
-``ValidationError``. For ``CharField``, this will be a Unicode empty string.
-For other ``Field`` classes, it might be ``None``. (This varies from field to
-field.)
+``ValidationError``. For ``CharField``, this will be an empty string. For other
+``Field`` classes, it might be ``None``. (This varies from field to field.)
Widgets of required form fields have the ``required`` HTML attribute. Set the
:attr:`Form.use_required_attribute` attribute to ``False`` to disable it. The
@@ -371,7 +370,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`TextInput`
* Empty value: Whatever you've given as :attr:`empty_value`.
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates ``max_length`` or ``min_length``, if they are provided.
Otherwise, all inputs are valid.
* Error message keys: ``required``, ``max_length``, ``min_length``
@@ -402,7 +401,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`Select`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates that the given value exists in the list of choices.
* Error message keys: ``required``, ``invalid_choice``
@@ -585,7 +584,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`EmailInput`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates that the given value is a valid email address, using a
moderately complex regular expression.
* Error message keys: ``required``, ``invalid``
@@ -629,7 +628,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`Select`
* Empty value: ``None``
- * Normalizes to: A unicode object
+ * Normalizes to: A string.
* Validates that the selected choice exists in the list of choices.
* Error message keys: ``required``, ``invalid_choice``
@@ -747,8 +746,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object. IPv6 addresses are
- normalized as described below.
+ * Normalizes to: A string. IPv6 addresses are normalized as described below.
* Validates that the given value is a valid IP address.
* Error message keys: ``required``, ``invalid``
@@ -780,7 +778,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`SelectMultiple`
* Empty value: ``[]`` (an empty list)
- * Normalizes to: A list of Unicode objects.
+ * Normalizes to: A list of strings.
* Validates that every value in the given list of values exists in the list
of choices.
* Error message keys: ``required``, ``invalid_choice``, ``invalid_list``
@@ -829,7 +827,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates that the given value matches against a certain regular
expression.
* Error message keys: ``required``, ``invalid``
@@ -856,7 +854,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates that the given value contains only letters, numbers,
underscores, and hyphens.
* Error messages: ``required``, ``invalid``
@@ -902,7 +900,7 @@ For each field, we describe the default widget used if you don't specify
* Default widget: :class:`URLInput`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates that the given value is a valid URL.
* Error message keys: ``required``, ``invalid``
@@ -936,7 +934,7 @@ Slightly complex built-in ``Field`` classes
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
- * Normalizes to: A Unicode object.
+ * Normalizes to: A string.
* Validates the given value against each of the fields specified
as an argument to the ``ComboField``.
* Error message keys: ``required``, ``invalid``