Added Response import in Code Snippet

Added `from rest_framework.response import Response` in the viewset code snippet example
This commit is contained in:
Shreyans Sheth 2017-09-30 22:46:48 +05:30 committed by GitHub
parent 018e43e908
commit 1326773763

View File

@ -26,6 +26,7 @@ Here we've used the `ReadOnlyModelViewSet` class to automatically provide the de
Next we're going to replace the `SnippetList`, `SnippetDetail` and `SnippetHighlight` view classes. We can remove the three views, and again replace them with a single class.
from rest_framework.decorators import detail_route
from rest_framework.response import Response
class SnippetViewSet(viewsets.ModelViewSet):
"""