File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -145,10 +145,18 @@ Note that you can use both an overridden `.get_queryset()` and generic filtering
145
145
The [ ` django-filter ` ] [ django-filter-docs ] library includes a ` DjangoFilterBackend ` class which
146
146
supports highly customizable field filtering for REST framework.
147
147
148
- To use ` DjangoFilterBackend ` , first install ` django-filter ` . Then add ` django_filters ` to Django's ` INSTALLED_APPS `
148
+ To use ` DjangoFilterBackend ` , first install ` django-filter ` .
149
149
150
150
pip install django-filter
151
151
152
+ Then add ` 'django_filters' ` to Django's ` INSTALLED_APPS ` :
153
+
154
+ INSTALLED_APPS = [
155
+ ...
156
+ 'django_filters',
157
+ ...
158
+ ]
159
+
152
160
You should now either add the filter backend to your settings:
153
161
154
162
REST_FRAMEWORK = {
@@ -365,4 +373,4 @@ The [djangorestframework-word-filter][django-rest-framework-word-search-filter]
365
373
[ django-url-filter ] : https://github.com/miki725/django-url-filter
366
374
[ drf-url-filter ] : https://github.com/manjitkumar/drf-url-filters
367
375
[ HStoreField ] : https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#hstorefield
368
- [ JSONField ] : https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#jsonfield
376
+ [ JSONField ] : https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#jsonfield
You can’t perform that action at this time.
0 commit comments