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
In the docs it states that that attribute should be a list:
filter_backends - A list of filter backend classes that should be used for filtering the queryset. Defaults to the same value as the DEFAULT_FILTER_BACKENDS setting.
And in the unittests that attribute is always a list or a tuple.
Why it was left that "casting" which results in a copy of the attribute while other similar attributes (renderer_classes, parser_classes, authentication_classes, permission_classes and throttle_classes) does not pass through a copy/casting mechanism?
How many time is wasted by this operation in the current DRF?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the generics package there is a explicit cast to list of
filter_backends
:django-rest-framework/rest_framework/generics.py
Line 153 in d3dd45b
In the docs it states that that attribute should be a list:
And in the unittests that attribute is always a list or a tuple.
Why it was left that "casting" which results in a copy of the attribute while other similar attributes (
renderer_classes
,parser_classes
,authentication_classes
,permission_classes
andthrottle_classes
) does not pass through a copy/casting mechanism?How many time is wasted by this operation in the current DRF?
Beta Was this translation helpful? Give feedback.
All reactions