# import view sets from the REST framework from rest_framework import viewsets # import the CustomerSerializer from the serializer file from .serializers import CustomerSerializer # import the Customer model from the models file from .models import Customer # create a class for the Customer model viewsets class CustomerView(viewsets.ModelViewSet): # create a serializer class and # assign it to the CustomerSerializerclass serializer_class = CustomerSerializer # define a variable and populate it # with the Customer list objects queryset = Customer.objects.all()