diff options
| author | Tom Christie | 2012-10-05 17:02:33 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-10-05 17:02:33 +0100 | 
| commit | cc21948a69f5cea90ca02042549af29c20e0268a (patch) | |
| tree | 3c40c6988adb90a488394ce3f6771876d9303c16 /docs/api-guide | |
| parent | ae3340bcd4cd8596459cf687c63ec2d8bf73fcd6 (diff) | |
| download | django-rest-framework-cc21948a69f5cea90ca02042549af29c20e0268a.tar.bz2 | |
Fix django 1.3 bug
Diffstat (limited to 'docs/api-guide')
| -rw-r--r-- | docs/api-guide/fields.md | 20 | 
1 files changed, 19 insertions, 1 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 009d2a79..5f3aba9a 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -6,14 +6,30 @@  >  > — [The Zen of Python][cite] +**Note:** The serializer fields are declared in fields.py, but by convention you should import them using `from rest_framework import serializers` and refer to fields as `serializers.<FieldName>`. + +Serializer fields handle converting between primative values and internal datatypes.  They also deal with validating input values, as well as retrieving and setting the values from their parent objects. +  # Generic Fields  ## Field +A generic, read-only field.  You can use this field for any attribute that does not need to support write operations. + +## WritableField + +A field that supports both read and  +  ## ModelField +A generic field that can be tied to any arbitrary model field.  The `ModelField` class delegates the task of serialization/deserialization to it's associated model field.  This field can be used to create serializer fields for custom model fields, without having to create a new custom serializer field. + +**Signature:** `ModelField(model_field=<Django ModelField class>)` +  # Typed Fields +These fields represent basic datatypes, and support both reading and writing values. +  ## BooleanField  ## CharField @@ -30,7 +46,7 @@  # Relational Fields -Relational fields are used to represent model relationships. +Relational fields are used to represent model relationships.  They can be applied to `ForeignKey`, `ManyToManyField` and `OneToOneField` relationships, as well as to reverse relationships, and custom relationships such as `GenericForeignKey`.  ## PrimaryKeyRelatedField @@ -40,4 +56,6 @@ Relational fields are used to represent model relationships.  ## ManyHyperlinkedRelatedField +## HyperLinkedIdentityField +  [cite]: http://www.python.org/dev/peps/pep-0020/  | 
