                      fields = filter_fields
  
              return AutoFilterSet
  
          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
  
      def to_html(self, request, queryset, view):
          filter_class = self.get_filter_class(view, queryset)
          if not filter_class:
              return None
          filter_instance = filter_class(request.query_params, queryset=queryset)
          context = {
              'filter': filter_instance
          }
          template = loader.get_template(self.template)
          return template_render(template, context)
  
      def get_schema_fields(self, view):
          assert coreapi is not None, 'coreapi must be installed to use `get_schema_fields()`'
          filter_class = getattr(view, 'filter_class', None)
          if filter_class:
              return [
                  coreapi.Field(name=field_name, required=False, location='query')
                  for field_name in filter_class().filters.keys()
              ]
  
          filter_fields = getattr(view, 'filter_fields', None)
          if filter_fields:
              return [
                  coreapi.Field(name=field_name, required=False, location='query')
                  for field_name in filter_fields
              ]
  
          return []
  
  
  class SearchFilter(BaseFilterBackend):
      # The URL query parameter used for the search.
      search_param = api_settings.SEARCH_PARAM
 
</s> remove             return AutoFilterSet
 </s> add         from django_filters.rest_framework import DjangoFilterBackend </s> remove     def get_filter_class(self, view, queryset=None):
        """
        Return the django-filters `FilterSet` used to filter the queryset.
        """
        filter_class = getattr(view, 'filter_class', None)
        filter_fields = getattr(view, 'filter_fields', None)

        if filter_class:
            filter_model = filter_class.Meta.model

            assert issubclass(queryset.model, filter_model), \
                'FilterSet model %s does not match queryset model %s' % \
                (filter_model, queryset.model)

            return filter_class

        if filter_fields:
            class AutoFilterSet(self.default_filter_set):
                class Meta:
                    model = queryset.model
                    fields = filter_fields
 </s> add         warnings.warn(
            "The built in 'rest_framework.filters.DjangoFilterBackend' is pending deprecation. "
            "You should use 'django_filters.rest_framework.DjangoFilterBackend' instead.",
            PendingDeprecationWarning
        ) </s> remove if 'crispy_forms' in settings.INSTALLED_APPS and crispy_forms and django_filters:
    # If django-crispy-forms is installed, use it to get a bootstrap3 rendering
    # of the DjangoFilterBackend controls when displayed as HTML.
    from crispy_forms.helper import FormHelper
    from crispy_forms.layout import Layout, Submit

    class FilterSet(django_filters.FilterSet):
        def __init__(self, *args, **kwargs):
            super(FilterSet, self).__init__(*args, **kwargs)
            for field in self.form.fields.values():
                field.help_text = None

            layout_components = list(self.form.fields.keys()) + [
                Submit('', _('Submit'), css_class='btn-default'),
            ]

            helper = FormHelper()
            helper.form_method = 'GET'
            helper.template_pack = 'bootstrap3'
            helper.layout = Layout(*layout_components)

            self.form.helper = helper

    filter_template = 'rest_framework/filters/django_filter_crispyforms.html'

elif django_filters:
    # If django-crispy-forms is not installed, use the standard
    # 'form.as_p' rendering when DjangoFilterBackend is displayed as HTML.
    class FilterSet(django_filters.FilterSet):
        def __init__(self, *args, **kwargs):
            super(FilterSet, self).__init__(*args, **kwargs)
            for field in self.form.fields.values():
                field.help_text = None

    filter_template = 'rest_framework/filters/django_filter.html'

else:
    FilterSet = None
    filter_template = None

 </s> add  </s> remove     default_filter_set = FilterSet
    template = filter_template

    def __init__(self):
 </s> add     def __new__(cls, *args, **kwargs):
        return DjangoFilterBackend(*args, **kwargs)
                      fields = filter_fields
  
              return AutoFilterSet
  
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
        return DjangoFilterBackend(*args, **kwargs)
  
  
  class SearchFilter(BaseFilterBackend):
      # The URL query parameter used for the search.
      search_param = api_settings.SEARCH_PARAM
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Deprecate DjangoFilter backend (#4593)

Deprecate the built-in `rest_framework.filters.DjangoFilterBackend` in favour of the third-party `django_filters.rest_framework.DjangoFilterBackend`. 
rest_framework/filters.py