mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-25 19:43:47 +03:00
Merge pull request #3368 from potpath/patch-1
Update 6-viewsets-and-routers.md
This commit is contained in:
commit
7ccdd015ae
|
@ -45,7 +45,7 @@ Next we're going to replace the `SnippetList`, `SnippetDetail` and `SnippetHighl
|
||||||
return Response(snippet.highlighted)
|
return Response(snippet.highlighted)
|
||||||
|
|
||||||
def perform_create(self, serializer):
|
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.
|
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