0👍
One approach would be to use Q objects or use direct filter lookups for the search query.
For the second one, you need to do something like:
-
Send queries to backend using query parameters. Eg:
base_url?Sports=foo&Competition=bar
-
Implement the get_queryset method of Event Viewset by using something like:
def get_queryset(self): query = Events.objects.all() if self.request.method == 'GET': query = query.filter(**dict(self.request.query_params))
Please note this is just POC for giving you an idea, not tested code.
- [Vuejs]-Problem with using vue.js routing and mixin
- [Vuejs]-Binding VueJS data variable to iFrame src
Source:stackexchange.com