Be sure to import UserSerializer

This commit is contained in:
dpetzel 2013-10-05 23:16:58 -04:00
parent 3833f1d55f
commit 864497eebb

View File

@ -76,6 +76,10 @@ We'll also add a couple of views. We'd like to just use read-only views for the
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.
url(r'^users/$', views.UserList.as_view()), url(r'^users/$', views.UserList.as_view()),