filter_queryset is specifically part of REST framework's generic filtering interface, and so using it as the point where the SpecMixin "hooks in" and applies the prepare function was a bit weird. Instead, we now override get_queryset, which is simpler and more idiomatic.
This also fixes a bug: if you were using OrderingFilter but your spec also contained a pair whose prepare function orders the queryset in some way, then previously the OrderingFilter didn't have any effect, because SpecMixin's filter_queryset happened after the base filter_queryset was called. Now, because we no longer override filter_queryset, the OrderingFilter is able to do its stuff to the already-prepared queryset.
filter_queryset
is specifically part of REST framework's generic filtering interface, and so using it as the point where theSpecMixin
"hooks in" and applies theprepare
function was a bit weird. Instead, we now overrideget_queryset
, which is simpler and more idiomatic.This also fixes a bug: if you were using
OrderingFilter
but your spec also contained a pair whoseprepare
function orders the queryset in some way, then previously theOrderingFilter
didn't have any effect, becauseSpecMixin
'sfilter_queryset
happened after the basefilter_queryset
was called. Now, because we no longer overridefilter_queryset
, theOrderingFilter
is able to do its stuff to the already-prepared queryset.