diff options
author | Stephen Finucane <stephen@that.guru> | 2017-04-04 22:38:17 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-04-28 22:19:57 +0100 |
commit | e8b60ac12a2fc339109f851da1cb543a220b7300 (patch) | |
tree | 6bb72e9b502c12ef47a96e888cbba6fea8883af7 /patchwork/settings | |
parent | c565029962be8f812555c6f9d782a5053e0e3942 (diff) | |
download | patchwork-e8b60ac12a2fc339109f851da1cb543a220b7300.tar patchwork-e8b60ac12a2fc339109f851da1cb543a220b7300.tar.gz |
compat: Handle older versions of django-filter
Recent versions of Django REST Framework (DRF) have deprecated the
'DjangoFilterBackend' filter found in-tree, in favour of an equivalent
implementation found in django-filter. However, we need to support older
versions of DRF for users who want to use system packages.
Seeing as the two implementations are, for all intents and purposes,
essentially the same thing, provide a shim that will allow us to use
both together.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Partial-bug: #94
Diffstat (limited to 'patchwork/settings')
-rw-r--r-- | patchwork/settings/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index 180a469..5d5caf1 100644 --- a/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -147,7 +147,7 @@ REST_FRAMEWORK = { 'rest_framework.versioning.NamespaceVersioning', 'DEFAULT_PAGINATION_CLASS': 'patchwork.api.base.LinkHeaderPagination', 'DEFAULT_FILTER_BACKENDS': ( - 'django_filters.rest_framework.DjangoFilterBackend', + 'patchwork.compat.DjangoFilterBackend', 'rest_framework.filters.SearchFilter', 'rest_framework.filters.OrderingFilter', ), |