Refs #23919, #27778 -- Removed obsolete mentions of unicode.

This commit is contained in:
Vytis Banaitis 2017-01-20 23:04:05 +02:00 committed by Tim Graham
parent 888c1e9bfe
commit d1bab24e01
63 changed files with 201 additions and 251 deletions

View file

@ -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()``
----------

View file

@ -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``