mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-09 16:10:50 +03:00
Make it more clear to add django_filters to INSTALLED_APPS in docs. (#7535)
This commit is contained in:
parent
04f39c42ee
commit
e17779c47b
|
@ -145,10 +145,18 @@ Note that you can use both an overridden `.get_queryset()` and generic filtering
|
|||
The [`django-filter`][django-filter-docs] library includes a `DjangoFilterBackend` class which
|
||||
supports highly customizable field filtering for REST framework.
|
||||
|
||||
To use `DjangoFilterBackend`, first install `django-filter`. Then add `django_filters` to Django's `INSTALLED_APPS`
|
||||
To use `DjangoFilterBackend`, first install `django-filter`.
|
||||
|
||||
pip install django-filter
|
||||
|
||||
Then add `'django_filters'` to Django's `INSTALLED_APPS`:
|
||||
|
||||
INSTALLED_APPS = [
|
||||
...
|
||||
'django_filters',
|
||||
...
|
||||
]
|
||||
|
||||
You should now either add the filter backend to your settings:
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user