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
currently, almost all api viewsets overwrite the get_queryset() method to always apply public=True, convert null/none values to the proper 'None' python format, and order the query results in a standard way.
maybe these get_queryset methods should be removed and, instead, use the more standard queryset=model object query. then we can/should add the standard orderingfilter & serarchfilter to each viewset via their filter_backends property.
currently, api responses are hard coded in the order which the viewset designates. making these changes would open up the user's (and our frontends) ability to sort the response from their request url and simplify the code.
currently, almost all api viewsets overwrite the
get_queryset()
method to always applypublic=True
, convert null/none values to the proper 'None' python format, and order the query results in a standard way.maybe these get_queryset methods should be removed and, instead, use the more standard
queryset=
model object query. then we can/should add the standard orderingfilter & serarchfilter to each viewset via theirfilter_backends
property.currently, api responses are hard coded in the order which the viewset designates. making these changes would open up the user's (and our frontends) ability to sort the response from their request url and simplify the code.
https://www.django-rest-framework.org/api-guide/filtering/#orderingfilter
https://www.django-rest-framework.org/api-guide/filtering/#searchfilter
The text was updated successfully, but these errors were encountered: