Search code examples
pythondjangodjango-rest-frameworkdjango-filters

import django_filters.rest_framework error


I'm getting error when try to use django rest framework filters by following this tutorial. The error appear when I try to import the library:

from django_filters.rest_framework import DjangoFilterBackend

and the error message is

ImportError: No module named 'django_filters.rest_framework'

FYI I'm using these version of library:

Django==1.10.3
django-crispy-forms==1.6.1
django-filter==0.11.0
djangorestframework==3.5.3

Thank you


Solution

  • django-filter added the rest_framework sub-package in the 0.15 release. The problem is that your environment originally had 0.11 installed.