Added Response import in Code Snippet (#5468)

Added `from rest_framework.response import Response` in the viewset code snippet example
This commit is contained in:
Shreyans Sheth 2017-10-02 12:34:55 +05:30 committed by Carlton Gibson
parent efc427dfc8
commit e6193cfd9e

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):
"""