diff options
| author | Tom Christie | 2015-01-23 15:43:21 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-01-23 15:43:21 +0000 | 
| commit | b07d931261c2e9f722fb2de63ab17f088142b6f1 (patch) | |
| tree | 584137aa7ed0193c490c49c063253328a3b11da7 /docs | |
| parent | 47ddbc09d9959f1116eabbf67e8d1943f35ffeef (diff) | |
| parent | 889a07f5563a0f970639a0958c0dcbc26e82919f (diff) | |
| download | django-rest-framework-b07d931261c2e9f722fb2de63ab17f088142b6f1.tar.bz2 | |
Merge pull request #2448 from tomchristie/uuid-field
Added UUIDField.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/fields.md | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index b3d274dd..64ec902b 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -182,6 +182,12 @@ Corresponds to `django.db.models.fields.URLField`.  Uses Django's `django.core.v  **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 @@ -320,7 +326,7 @@ Both the `allow_blank` and `allow_null` are valid options on `ChoiceField`, alth  ## 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)` | 
