From 01587b9eb17bf68c716e84e616202d6e4ccbaecf Mon Sep 17 00:00:00 2001 From: Hang Park Date: Mon, 4 Dec 2017 21:00:03 +0900 Subject: [PATCH] Typos in serializers documentation (#5652) Fixes #5651. Change `update()` to `.update()` in serializers documentation to get a consistency with `.create()`. --- docs/api-guide/serializers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index ee6e41607..89196949d 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -73,7 +73,7 @@ Deserialization is similar. First we parse a stream into Python native datatypes ## Saving instances -If we want to be able to return complete object instances based on the validated data we need to implement one or both of the `.create()` and `update()` methods. For example: +If we want to be able to return complete object instances based on the validated data we need to implement one or both of the `.create()` and `.update()` methods. For example: class CommentSerializer(serializers.Serializer): email = serializers.EmailField() @@ -325,7 +325,7 @@ For updates you'll want to think carefully about how to handle updates to relati * Ignore the data and leave the instance as it is. * Raise a validation error. -Here's an example for an `update()` method on our previous `UserSerializer` class. +Here's an example for an `.update()` method on our previous `UserSerializer` class. def update(self, instance, validated_data): profile_data = validated_data.pop('profile')