Skip to content

Commit

Permalink
Merge pull request #41 from JostCrow/patch-1
Browse files Browse the repository at this point in the history
Added some imports to the readme
  • Loading branch information
miki725 authored Aug 15, 2017
2 parents 242b368 + 777fbf4 commit 66f3ac2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 66f3ac2

Please sign in to comment.