Open gonvaled opened 6 years ago
@gonvaled Did you find a solution to this?
Add DynamicFilterBackend to the list of filter backends
It took me a while to track down, but it's caused by the pagination_class
that's automatically set by the DynamicModelViewSet
. If you override that, it shows the filters again.
For some reason the DynamicModelViewSet
doesn't listen to any setting either, it always defaults your view's pagination_class
to it's own.
But... after looking at the code I suspect the workings of dynamic-rest are really out of date from how django-rest-framework is handling sorting/pagination/etc. I noticed several differences between the overridden code and the DRF internals so for now I've stopped trying to integrate this library within my project. I find it a bit too invasive with the (seemingly) needless overriding of paginator classes, filter backends and more.
I believe it's in need of a pretty big update before the API browser is fully functional (again?).
I am having problems with how
drf
,dynamic-rest
anddjango_filters
are playing together.I have:
I have this defined:
And this:
This does not work:
No filtering is possible, and the
Filters
button is not shown in the browsable API.Doing this:
allows for filtering, but no
Filters
button is shown in the browsable API.Doing this:
allows for filtering and shows a
Filters
button in the browsable API.