Skip to content

Commit e6193cf

Browse files
bholagabbarCarlton Gibson
authored andcommitted
Added Response import in Code Snippet (#5468)
Added `from rest_framework.response import Response` in the viewset code snippet example
1 parent efc427d commit e6193cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/tutorial/6-viewsets-and-routers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Here we've used the `ReadOnlyModelViewSet` class to automatically provide the de
2626
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.
2727

2828
from rest_framework.decorators import detail_route
29+
from rest_framework.response import Response
2930

3031
class SnippetViewSet(viewsets.ModelViewSet):
3132
"""

0 commit comments

Comments
 (0)