Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Contributors
------------

* João Neto - https://github.com/netjinho
* Jorik Kraaikamp - https://github.com/JostCrow
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ with Django REST Framework but it can be used without DRF (see below).

::

from url_filter.integrations.drf import DjangoFilterBackend


class UserViewSet(ModelViewSet):
queryset = User.objects.all()
serializer_class = UserSerializer
Expand All @@ -67,6 +70,10 @@ with Django REST Framework but it can be used without DRF (see below).
Alternatively filterset can be manually created and used directly
to filter querysets::

from django.http import QueryDict
from url_filter.filtersets import ModelFilterSet


class UserFilterSet(ModelFilterSet):
class Meta(object):
model = User
Expand Down