philipn/django-rest-framework-filters

Module has no attribute ComplexFilterBackend

ross-weir opened this issue · 1 comments

Hey guys,

This is likely just configuration error but I have been completely unable to solve it.

I'm getting the following error when trying to use the django-rest-framework-filters package:

ImportError: Could not import 'rest_framework_filters.backends.ComplexFilterBackend' for API setting 'DEFAULT_FILTER_BACKENDS'. AttributeError: module 'rest_framework_filters.backends' has no attribute 'ComplexFilterBackend'.

I have installed the package djangorestframework-filters = "*" and it is present in my Pipfile. I also have all the other requirements installed as well as the correct versions.

My projects settings are configured as follows:

INSTALLED_APPS = [
    "accounts.apps.AccountsConfig",
    "items.apps.ItemsConfig",
    "rest_framework",
    "django_filters",
    "rest_framework_filters",
    "django_extensions",
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
]

REST_FRAMEWORK = {
    "DEFAULT_FILTER_BACKENDS": ("rest_framework_filters.backends.ComplexFilterBackend",)
}

I have tried rearranging my installed apps in hopes that might have some affect but no luck (I'm kinda new to django and python 👍 )

I am also able to open a shell and use what I think is other parts of the package except for backends.

I am not trying to use the package yet. Just trying to get my project to run without this error. Any help would be greatly appreciated. Sorry for posting here as an issue, I hope to use your sweet looking package as soon as I get this cleared up! :)

Thanks

Hi @ross-weir, the complex filter backend is part of the 1.0 milestone that hasn't been released yet. I'm currently rewriting the docs and once that's done, 1.0 will be released.

In the meantime, the project is relatively stable and shouldn't see many changes before release. It should be relatively safe to install from the master branch.