From 987880e13138a93d9cc0e44b7ed30297909f7b03 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Tue, 27 Jan 2015 23:15:26 +0100 Subject: Update documentation --- api-guide/fields/index.html | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'api-guide/fields') diff --git a/api-guide/fields/index.html b/api-guide/fields/index.html index 9cac530a..83affe26 100644 --- a/api-guide/fields/index.html +++ b/api-guide/fields/index.html @@ -405,6 +405,10 @@ URLField +
  • + UUIDField +
  • + @@ -493,6 +497,10 @@ ListField +
  • + DictField +
  • + @@ -674,6 +682,10 @@ color_channel = serializers.ChoiceField(

    A RegexField that validates the input against a URL matching pattern. Expects fully qualified URLs of the form http://<host>/<path>.

    Corresponds to django.db.models.fields.URLField. Uses Django's django.core.validators.URLValidator for validation.

    Signature: URLField(max_length=200, min_length=None, allow_blank=False)

    +

    UUIDField

    +

    A field that ensures the input is a valid UUID string. The to_internal_value method will return a uuid.UUID instance. On output the field will return a string in the canonical hyphenated format, for example:

    +
    "de305d54-75b4-431b-adb2-eb6b9e546013"
    +

    Numeric fields

    IntegerField

    @@ -767,7 +779,7 @@ color_channel = serializers.ChoiceField(

    Both the allow_blank and allow_null are valid options on ChoiceField, although it is highly recommended that you only use one and not both. allow_blank should be preferred for textual choices, and allow_null should be preferred for numeric or other non-textual choices.

    MultipleChoiceField

    -

    A field that can accept a set of zero, one or many values, chosen from a limited set of choices. Takes a single mandatory argument. to_internal_representation returns a set containing the selected values.

    +

    A field that can accept a set of zero, one or many values, chosen from a limited set of choices. Takes a single mandatory argument. to_internal_value returns a set containing the selected values.

    Signature: MultipleChoiceField(choices)