Merge pull request #3650 from silviogutierrez/master

Documentation fix for list serializers.
This commit is contained in:
Xavier Ordoquy 2015-11-19 07:46:01 +01:00
commit f3de2146ea

View File

@ -800,6 +800,10 @@ Here's an example of how you might choose to implement multiple updates:
return ret return ret
class BookSerializer(serializers.Serializer): class BookSerializer(serializers.Serializer):
# We need to identify elements in the list using their primary key,
# so use a writable field here, rather than the default which would be read-only.
id = serializers.IntegerField()
... ...
class Meta: class Meta:
list_serializer_class = BookListSerializer list_serializer_class = BookListSerializer