Skip to content

Commit 01587b9

Browse files
hangparkRyan P Kilby
authored andcommitted
Typos in serializers documentation (#5652)
Fixes #5651. Change `update()` to `.update()` in serializers documentation to get a consistency with `.create()`.
1 parent 7855d3b commit 01587b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api-guide/serializers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Deserialization is similar. First we parse a stream into Python native datatypes
7373

7474
## Saving instances
7575

76-
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:
76+
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:
7777

7878
class CommentSerializer(serializers.Serializer):
7979
email = serializers.EmailField()
@@ -325,7 +325,7 @@ For updates you'll want to think carefully about how to handle updates to relati
325325
* Ignore the data and leave the instance as it is.
326326
* Raise a validation error.
327327

328-
Here's an example for an `update()` method on our previous `UserSerializer` class.
328+
Here's an example for an `.update()` method on our previous `UserSerializer` class.
329329

330330
def update(self, instance, validated_data):
331331
profile_data = validated_data.pop('profile')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy