Update 6-viewsets-and-routers.md

This commit is contained in:
potpath 2015-09-04 16:07:20 +07:00
parent 39ec564ae9
commit bb95de13bf

View File

@ -45,7 +45,7 @@ Next we're going to replace the `SnippetList`, `SnippetDetail` and `SnippetHighl
return Response(snippet.highlighted)
def perform_create(self, serializer):
serializer.save(owner=self.request.user)
serializer.save(owner=self.request.user)
This time we've used the `ModelViewSet` class in order to get the complete set of default read and write operations.