mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Update 6-viewsets-and-routers.md
This commit is contained in:
parent
39ec564ae9
commit
bb95de13bf
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user