Mosh’s video cut off the beginning of the solution where he adds “RetrieveModelMixin” to the CartViewSet so it becomes:
class CartViewSet(CreateModelMixin, RetrieveModelMixin, GenericViewSet):
queryset = Cart.objects.all()
serializer_class = CartSerializer
You see that he added it at timestamp 8:36 of the lesson 5 video.
I found it from these smart people on the forum here and here:
1 Like