Commit 864497ee by dpetzel

Be sure to import UserSerializer

parent 3833f1d5
...@@ -75,6 +75,10 @@ We'll also add a couple of views. We'd like to just use read-only views for the ...@@ -75,6 +75,10 @@ We'll also add a couple of views. We'd like to just use read-only views for the
class UserDetail(generics.RetrieveAPIView): class UserDetail(generics.RetrieveAPIView):
queryset = User.objects.all() queryset = User.objects.all()
serializer_class = UserSerializer serializer_class = UserSerializer
Make sure to also import the `UserSerializer` class
from snippets.serializers import UserSerializer
Finally we need to add those views into the API, by referencing them from the URL conf. Finally we need to add those views into the API, by referencing them from the URL conf.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment