Skip to content

Commit

Permalink
[1.5.x] Added links to default widget in forms.fields documentation
Browse files Browse the repository at this point in the history
Backport of 2d0b35d from master.
  • Loading branch information
claudep committed Dec 29, 2012
1 parent 5097d3c commit 0c96aae
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions docs/ref/forms/fields.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: BooleanField(**kwargs)

* Default widget: ``CheckboxInput``
* Default widget: :class:`CheckboxInput`
* Empty value: ``False``
* Normalizes to: A Python ``True`` or ``False`` value.
* Validates that the value is ``True`` (e.g. the check box is checked) if
Expand All @@ -309,7 +309,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: CharField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates ``max_length`` or ``min_length``, if they are provided.
Expand All @@ -329,7 +329,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: ChoiceField(**kwargs)

* Default widget: ``Select``
* Default widget: :class:`Select`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value exists in the list of choices.
Expand All @@ -355,7 +355,7 @@ For each field, we describe the default widget used if you don't specify
Just like a :class:`ChoiceField`, except :class:`TypedChoiceField` takes two
extra arguments, ``coerce`` and ``empty_value``.

* Default widget: ``Select``
* Default widget: :class:`Select`
* Empty value: Whatever you've given as ``empty_value``
* Normalizes to: A value of the type provided by the ``coerce`` argument.
* Validates that the given value exists in the list of choices and can be
Expand All @@ -382,7 +382,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: DateField(**kwargs)

* Default widget: ``DateInput``
* Default widget: :class:`DateInput`
* Empty value: ``None``
* Normalizes to: A Python ``datetime.date`` object.
* Validates that the given value is either a ``datetime.date``,
Expand Down Expand Up @@ -421,7 +421,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: DateTimeField(**kwargs)

* Default widget: ``DateTimeInput``
* Default widget: :class:`DateTimeInput`
* Empty value: ``None``
* Normalizes to: A Python ``datetime.datetime`` object.
* Validates that the given value is either a ``datetime.datetime``,
Expand Down Expand Up @@ -454,7 +454,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: DecimalField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``None``
* Normalizes to: A Python ``decimal``.
* Validates that the given value is a decimal. Leading and trailing
Expand Down Expand Up @@ -489,7 +489,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: EmailField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value is a valid email address, using a
Expand All @@ -505,7 +505,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: FileField(**kwargs)

* Default widget: ``ClearableFileInput``
* Default widget: :class:`ClearableFileInput`
* Empty value: ``None``
* Normalizes to: An ``UploadedFile`` object that wraps the file content
and file name into a single object.
Expand Down Expand Up @@ -533,7 +533,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: FilePathField(**kwargs)

* Default widget: ``Select``
* Default widget: :class:`Select`
* Empty value: ``None``
* Normalizes to: A unicode object
* Validates that the selected choice exists in the list of choices.
Expand Down Expand Up @@ -580,7 +580,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: FloatField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``None``
* Normalizes to: A Python float.
* Validates that the given value is an float. Leading and trailing
Expand All @@ -596,7 +596,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: ImageField(**kwargs)

* Default widget: ``ClearableFileInput``
* Default widget: :class:`ClearableFileInput`
* Empty value: ``None``
* Normalizes to: An ``UploadedFile`` object that wraps the file content
and file name into a single object.
Expand All @@ -621,7 +621,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: IntegerField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``None``
* Normalizes to: A Python integer or long integer.
* Validates that the given value is an integer. Leading and trailing
Expand All @@ -644,7 +644,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: IPAddressField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value is a valid IPv4 address, using a regular
Expand All @@ -660,7 +660,7 @@ For each field, we describe the default widget used if you don't specify

A field containing either an IPv4 or an IPv6 address.

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object. IPv6 addresses are
normalized as described below.
Expand Down Expand Up @@ -693,7 +693,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: MultipleChoiceField(**kwargs)

* Default widget: ``SelectMultiple``
* Default widget: :class:`SelectMultiple`
* Empty value: ``[]`` (an empty list)
* Normalizes to: A list of Unicode objects.
* Validates that every value in the given list of values exists in the list
Expand All @@ -713,7 +713,7 @@ For each field, we describe the default widget used if you don't specify
Just like a :class:`MultipleChoiceField`, except :class:`TypedMultipleChoiceField`
takes two extra arguments, ``coerce`` and ``empty_value``.

* Default widget: ``SelectMultiple``
* Default widget: :class:`SelectMultiple`
* Empty value: Whatever you've given as ``empty_value``
* Normalizes to: A list of values of the type provided by the ``coerce``
argument.
Expand All @@ -731,7 +731,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: NullBooleanField(**kwargs)

* Default widget: ``NullBooleanSelect``
* Default widget: :class:`NullBooleanSelect`
* Empty value: ``None``
* Normalizes to: A Python ``True``, ``False`` or ``None`` value.
* Validates nothing (i.e., it never raises a ``ValidationError``).
Expand All @@ -741,7 +741,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: RegexField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value matches against a certain regular
Expand All @@ -768,7 +768,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: SlugField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value contains only letters, numbers,
Expand All @@ -783,7 +783,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: TimeField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``None``
* Normalizes to: A Python ``datetime.time`` object.
* Validates that the given value is either a ``datetime.time`` or string
Expand All @@ -807,7 +807,7 @@ For each field, we describe the default widget used if you don't specify

.. class:: URLField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value is a valid URL.
Expand All @@ -829,7 +829,7 @@ Slightly complex built-in ``Field`` classes

.. class:: ComboField(**kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: A Unicode object.
* Validates that the given value against each of the fields specified
Expand All @@ -856,7 +856,7 @@ Slightly complex built-in ``Field`` classes

.. class:: MultiValueField(fields=(), **kwargs)

* Default widget: ``TextInput``
* Default widget: :class:`TextInput`
* Empty value: ``''`` (an empty string)
* Normalizes to: the type returned by the ``compress`` method of the subclass.
* Validates that the given value against each of the fields specified
Expand Down Expand Up @@ -902,7 +902,7 @@ Slightly complex built-in ``Field`` classes

.. class:: SplitDateTimeField(**kwargs)

* Default widget: ``SplitDateTimeWidget``
* Default widget: :class:`SplitDateTimeWidget`
* Empty value: ``None``
* Normalizes to: A Python ``datetime.datetime`` object.
* Validates that the given value is a ``datetime.datetime`` or string
Expand Down Expand Up @@ -945,7 +945,7 @@ objects (in the case of ``ModelMultipleChoiceField``) into the

.. class:: ModelChoiceField(**kwargs)

* Default widget: ``Select``
* Default widget: :class:`Select`
* Empty value: ``None``
* Normalizes to: A model instance.
* Validates that the given id exists in the queryset.
Expand Down Expand Up @@ -1000,7 +1000,7 @@ objects (in the case of ``ModelMultipleChoiceField``) into the

.. class:: ModelMultipleChoiceField(**kwargs)

* Default widget: ``SelectMultiple``
* Default widget: :class:`SelectMultiple`
* Empty value: An empty ``QuerySet`` (self.queryset.none())
* Normalizes to: A ``QuerySet`` of model instances.
* Validates that every id in the given list of values exists in the
Expand Down

0 comments on commit 0c96aae

Please sign in to comment.