summaryrefslogtreecommitdiff
path: root/patchwork/settings
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2017-04-04 22:38:17 +0100
committerStephen Finucane <stephen@that.guru>2017-04-28 22:19:57 +0100
commite8b60ac12a2fc339109f851da1cb543a220b7300 (patch)
tree6bb72e9b502c12ef47a96e888cbba6fea8883af7 /patchwork/settings
parentc565029962be8f812555c6f9d782a5053e0e3942 (diff)
downloadpatchwork-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.py2
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',
),