You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using rest_framework.filters.OrderingFilter in a view, one can add a list of comma-separated field names to an "order" query parameter (see the docs). However, those lists are currently not affected by this package, making it incompatible with it out-of-the-box. I solved this, by extending the get_ordering method of the OrderingFilter class:
Now there are other packages using field lists in query parameters. I am currently trying to add drf-flex-fields to my app and I haven't found a good way to customize it to use "underscoreize" the fields and expand lists in this case.
Has anyone else faced this problem and has a solution? Or is it maybe in the scope of this project to provide a solution for field lists in query parameters?
The text was updated successfully, but these errors were encountered:
When using
rest_framework.filters.OrderingFilter
in a view, one can add a list of comma-separated field names to an "order" query parameter (see the docs). However, those lists are currently not affected by this package, making it incompatible with it out-of-the-box. I solved this, by extending theget_ordering
method of theOrderingFilter
class:Now there are other packages using field lists in query parameters. I am currently trying to add drf-flex-fields to my app and I haven't found a good way to customize it to use "underscoreize" the
fields
andexpand
lists in this case.Has anyone else faced this problem and has a solution? Or is it maybe in the scope of this project to provide a solution for field lists in query parameters?
The text was updated successfully, but these errors were encountered: