Skip to content

feature: SearchByQueryParamFilterBackend

Calum Mackervoy requested to merge 401-search-queryparam into master

Providing basic, ibasic and exact search to generic model fields. Information on usage added to the docs in the code changes

Closes #401 (closed)

I added a little flexibility to applying the search (e.g. choosing the merging policy, the search method, searching multiple fields). I think that in most use cases this level of granularity will suffice - for anything more complex it will require custom viewsets, or the use of something more like GraphQL

I didn't yet provide search on virtual fields, in the end I applied it as a FilterBackend. Putting it in a filter-backend made it modular and easy to add/remove in custom views, and my observation is that virtual fields haven't been used to a large extent in production

Merge request reports