diff options
| author | Tom Christie | 2012-11-08 21:46:53 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-11-08 21:46:53 +0000 |
| commit | bc6f2a170306fbc1cba3a4e504a908ebc72d54b7 (patch) | |
| tree | 8722b675ea4c5ce29822476f304e1389c870a4af /docs | |
| parent | c78b34d5017a05220bcd623946b4f52cc2d119cd (diff) | |
| download | django-rest-framework-bc6f2a170306fbc1cba3a4e504a908ebc72d54b7.tar.bz2 | |
Make default FILTER_BACKEND = None
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/filtering.md | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index ea1e7d23..ca901b03 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -82,17 +82,19 @@ We can override `.get_queryset()` to deal with URLs such as `http://example.com/ As well as being able to override the default queryset, REST framework also includes support for generic filtering backends that allow you to easily construct complex filters that can be specified by the client using query parameters. -REST framework supports pluggable backends to implement filtering, and includes a default implementation which uses the [django-filter] package. +REST framework supports pluggable backends to implement filtering, and provides an implementation which uses the [django-filter] package. To use REST framework's default filtering backend, first install `django-filter`. pip install -e git+https://github.com/alex/django-filter.git#egg=django-filter -**Note**: The currently supported version of `django-filter` is the `master` branch. A PyPI release is expected to be coming soon. +You must also set the filter backend to `DjangoFilterBackend` in your settings: -## Specifying filter fields + REST_FRAMEWORK = { + 'FILTER_BACKEND': 'rest_framework.filters.DjangoFilterBackend' + } -**TODO**: Document setting `.filter_fields` on the view. +**Note**: The currently supported version of `django-filter` is the `master` branch. A PyPI release is expected to be coming soon. ## Specifying a FilterSet @@ -100,6 +102,10 @@ To use REST framework's default filtering backend, first install `django-filter` **TODO**: Note support for `lookup_type`, double underscore relationship spanning, and ordering. +## Specifying filter fields + +**TODO**: Document setting `.filter_fields` on the view. + **TODO**: Note that overiding `get_queryset()` can be used together with generic filtering --- |
