examerioLogin

How can you restrict which queryset a DRF view uses?

πŸ“˜ Explanation

In DRF you control the data a view exposes by setting the queryset attribute or overriding get_queryset() for dynamic filtering, such as per-user data. The wrong answers point to serializer validate(), perform_create(), or a nonexistent Meta attribute, none of which is the standard mechanism for restricting a view's queryset.

Related questions

← PreviousNo login needed