  
          return None
  
      def filter_queryset(self, request, queryset, view):
          filter_class = self.get_filter_class(view)
  
          if filter_class:
              return filter_class(request.QUERY_PARAMS, queryset=queryset).qs
  
          return queryset
 
</s> remove         model_cls = getattr(view, 'model', None)
        queryset = getattr(view, 'queryset', None)
        if model_cls is None and queryset is not None:
            model_cls = queryset.model
 </s> add  </s> remove             assert issubclass(filter_model, model_cls), \
                'FilterSet model %s does not match view model %s' % \
                (filter_model, model_cls)
 </s> add             assert issubclass(filter_model, queryset.model), \
                'FilterSet model %s does not match queryset model %s' % \
                (filter_model, queryset.model) </s> remove                     model = model_cls
 </s> add                     model = queryset.model </s> remove             assert model_cls is not None, 'Cannot use DjangoFilterBackend ' \
                'on a view which does not have a .model or .queryset attribute.'

 </s> add 
        filter_class = self.get_filter_class(view, queryset)
  
          return None
  
      def filter_queryset(self, request, queryset, view):
        filter_class = self.get_filter_class(view, queryset)
  
          if filter_class:
              return filter_class(request.QUERY_PARAMS, queryset=queryset).qs
  
          return queryset
keep keep keep keep replace keep keep keep keep keep
 Base automatic filterset model on the queryset model.  Fixes #834. 
rest_framework/filters.py