-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage with Django Rest Framework #15
Comments
can you give more info to get help? I will do my best✌️ |
I just want to know whether we can use it in Django Rest Framework or not ? If yes, can you give me an example and showcase how to use this in our APIs ? |
let's create an example API using Django Rest Framework:
and this should be views.py:
and urls.py:
you can now access your API at the endpoint This will return a list of films filtered by type "action" and rating "PG-13" if there was any problem, let me know, but I think it fixes #15 |
@Frenchcoder294 How would you display (or access) the facet counts in the DRF view? Thank you. |
@stefanofusai like this: Accessing facet counts in the Serializer
or like this: Overriding the get_queryset method in the ViewSet:
btw, sorry if it was late😉 |
How do I use this using DRF's ListAPIView ?
The text was updated successfully, but these errors were encountered: