diff options
| author | Toby Champion | 2013-06-12 13:53:39 -0700 |
|---|---|---|
| committer | Toby Champion | 2013-06-12 14:51:17 -0700 |
| commit | 250dfef158b107178ff9bea1743c767af9210d5e (patch) | |
| tree | a9cc1ef576b2d3860a7daa5bb2c9b83073ef035a /docs/api-guide/serializers.md | |
| parent | 1cc2a7b25e78fcb41f44dc5b580f0f00a0a6318a (diff) | |
| download | django-rest-framework-250dfef158b107178ff9bea1743c767af9210d5e.tar.bz2 | |
Changes 'python' to 'Python' when used in prose.
Diffstat (limited to 'docs/api-guide/serializers.md')
| -rw-r--r-- | docs/api-guide/serializers.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index 0885eb52..f8761cb2 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -8,7 +8,7 @@ will take some serious design work. > > — Russell Keith-Magee, [Django users group][cite] -Serializers allow complex data such as querysets and model instances to be converted to native python datatypes that can then be easily rendered into `JSON`, `XML` or other content types. Serializers also provide deserialization, allowing parsed data to be converted back into complex types, after first validating the incoming data. +Serializers allow complex data such as querysets and model instances to be converted to native Python datatypes that can then be easily rendered into `JSON`, `XML` or other content types. Serializers also provide deserialization, allowing parsed data to be converted back into complex types, after first validating the incoming data. REST framework's serializers work very similarly to Django's `Form` and `ModelForm` classes. It provides a `Serializer` class which gives you a powerful, generic way to control the output of your responses, as well as a `ModelSerializer` class which provides a useful shortcut for creating serializers that deal with model instances and querysets. @@ -57,7 +57,7 @@ We can now use `CommentSerializer` to serialize a comment, or list of comments. serializer.data # {'email': u'leila@example.com', 'content': u'foo bar', 'created': datetime.datetime(2012, 8, 22, 16, 20, 9, 822774)} -At this point we've translated the model instance into python native datatypes. To finalise the serialization process we render the data into `json`. +At this point we've translated the model instance into Python native datatypes. To finalise the serialization process we render the data into `json`. json = JSONRenderer().render(serializer.data) json @@ -65,7 +65,7 @@ At this point we've translated the model instance into python native datatypes. ## Deserializing objects -Deserialization is similar. First we parse a stream into python native datatypes... +Deserialization is similar. First we parse a stream into Python native datatypes... stream = StringIO(json) data = JSONParser().parse(stream) |
