aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2014-07-01 14:34:23 +0100
committerTom Christie2014-07-01 14:34:23 +0100
commit91eabd54bbc42e8a2540db2ff070097db7a0f4a0 (patch)
treea7b55ddc86a19e0661fa6adaa2d7191ac67ea2c3
parent8eadac39adcf0e0f1981d0a07acd30268ba4f03a (diff)
downloaddjango-rest-framework-91eabd54bbc42e8a2540db2ff070097db7a0f4a0.tar.bz2
Docs tweak
-rw-r--r--docs/api-guide/filtering.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md
index 6a8a267b..ec5ab61f 100644
--- a/docs/api-guide/filtering.md
+++ b/docs/api-guide/filtering.md
@@ -199,8 +199,7 @@ This enables us to make queries like:
http://example.com/api/products?manufacturer__name=foo
-This is nice, but it shows underlying model structure in REST API, which may
-be undesired, but you can use:
+This is nice, but it exposes the Django's double underscore convention as part of the API. If you instead want to explicitly name the filter argument you can instead explicitly include it on the `FilterSet` class:
import django_filters
from myapp.models import Product
@@ -208,7 +207,6 @@ be undesired, but you can use:
from rest_framework import generics
class ProductFilter(django_filters.FilterSet):
-
manufacturer = django_filters.CharFilter(name="manufacturer__name")
class Meta: