mirror of https://github.com/django/django.git
[1.5.x] Added links to default widget in forms.fields documentation
Backport of 2d0b35d2bb
from master.
This commit is contained in:
parent
5097d3c5fa
commit
0c96aae700
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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``,
|
||||
|
@ -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``,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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``).
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue