      Test cases for setting the `fields` attribute on a view.
      """
      def setUp(self):
          class OverriddenFieldsView(generics.RetrieveUpdateDestroyAPIView):
              model = BasicModel
              fields = ('text',)
  
          class RegularView(generics.RetrieveUpdateDestroyAPIView):
              model = BasicModel
  
 
</s> remove             model = BasicModel
 </s> add             queryset = BasicModel.objects.all() </s> remove                 model = self.model
 </s> add                 model = self.model or self.queryset.model </s> remove     # If the `model` shortcut is used instead of `serializer_class`, then the
    # serializer class will be constructed using this class as the base.
 </s> add     # The following attributes may be subject to change,
    # and should be considered private API. </s> remove Using explict `queryset` and `serializer_class` attributes makes the functioning of the view more clear than using the shortcut `model` attribute.
 </s> add Using an explict `queryset` attribute makes the functioning of the view more clear than using the shortcut `model` attribute.
            queryset = BasicModel.objects.all()
      Test cases for setting the `fields` attribute on a view.
      """
      def setUp(self):
          class OverriddenFieldsView(generics.RetrieveUpdateDestroyAPIView):
            queryset = BasicModel.objects.all()
              fields = ('text',)
  
          class RegularView(generics.RetrieveUpdateDestroyAPIView):
              model = BasicModel
  
keep keep keep keep replace keep keep keep keep keep
 Tweaks for preferring .queryset over .model 
rest_framework/tests/generics.py