  import datetime
  import unittest
  from decimal import Decimal
  
  from django.conf.urls import url
  from django.core.exceptions import ImproperlyConfigured
  from django.db import models
 
</s> remove from django.conf import settings
 </s> add  </s> remove     coreapi, crispy_forms, distinct, django_filters, guardian, template_render
 </s> add     coreapi, distinct, django_filters, guardian, template_render </s> remove             return AutoFilterSet
 </s> add         from django_filters.rest_framework import DjangoFilterBackend </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 
import warnings
  import datetime
  import unittest
import warnings
  from decimal import Decimal
  
  from django.conf.urls import url
  from django.core.exceptions import ImproperlyConfigured
  from django.db import models
keep add 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`. 
tests/test_filters.py