The backend was moved out in 3.5 and went through the deprecation process, 
finally being removed in 3.7. 

https://www.django-rest-framework.org/community/3.7-announcement/

Update your imports to use django_filters.rest_framework, as per the docs 
linked in Jakob's reply. 

Sent from my iPhone

> On 19 Jan 2019, at 07:40, Jakob Damgaard Møller <[email protected]> wrote:
> 
> And you have installed the Django filter as described below:
> 
> https://www.django-rest-framework.org/api-guide/filtering/#djangofilterbackend
> 
> 
>> lør. 19. jan. 2019 kl. 00.16 skrev Praveen Kumar 
>> <[email protected]>:
>> I am upgrading Django from 1.8 to 2.1.5 and Python 2.7 to 3.6. On the 
>> process, I upgraded djangorestframework to 3.8.2 from 3.6.4.
>> 
>> 
>> 
>> 
>> 
>> After upgrade, I see this error trace:
>> 
>> File "/usr/local/lib/python3.6/dist-packages/rest_framework/generics.py", 
>> line 26, in 
>> 
>> class GenericAPIView(views.APIView):
>> 
>> File "/usr/local/lib/python3.6/dist-packages/rest_framework/generics.py", 
>> line 45, in GenericAPIView
>> 
>> filter_backends = api_settings.DEFAULT_FILTER_BACKENDS
>> 
>> File "/usr/local/lib/python3.6/dist-packages/rest_framework/settings.py", 
>> line 227, in getattr
>> 
>> val = perform_import(val, attr)
>> 
>> File "/usr/local/lib/python3.6/dist-packages/rest_framework/settings.py", 
>> line 172, in perform_import
>> 
>> return [import_from_string(item, setting_name) for item in val]
>> 
>> File "/usr/local/lib/python3.6/dist-packages/rest_framework/settings.py", 
>> line 172, in 
>> 
>> return [import_from_string(item, setting_name) for item in val]
>> 
>> File "/usr/local/lib/python3.6/dist-packages/rest_framework/settings.py", 
>> line 187, in import_from_string
>> 
>> raise ImportError(msg)
>> 
>> ImportError: Could not import 'rest_framework.filters.DjangoFilterBackend' 
>> for API setting 'DEFAULT_FILTER_BACKENDS'. AttributeError: module 
>> 'rest_framework.filters' has no attribute 'DjangoFilterBackend'.
>> 
>> 
>> 
>> I am not sure where I am going wrong. Any help on this issue is much 
>> appreciated.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django REST framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
> -- 
> Jakob Damgaard Olsen
> Tlf: 24613112
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to