Update Tutorial - Relationships & Hyperlinked APIs

unnecessary import, because it is already added in the previous section
This commit is contained in:
juliangeissler 2021-04-23 13:13:47 +00:00 committed by GitHub
parent 431f7dfa3d
commit 8f42b009f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,6 @@ The other thing we need to consider when creating the code highlight view is tha
Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own `.get()` method. In your `snippets/views.py` add:
from rest_framework import renderers
from rest_framework.response import Response
class SnippetHighlight(generics.GenericAPIView):
queryset = Snippet.objects.all()