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
I need to call the following url: users/:user_pk/photos/:photo_pk/
To get only the photos related to the user having id=user_pk if the user exists, I have to extend the get_queryset method to be able to raise NotFound exception if no user with id=user_pk exists.
Which is the best way to manage it since I'm performing a query on the DB and the get_queryset method is only sync in GenericAPIView, GenericViewSet, etc?
The text was updated successfully, but these errors were encountered:
I need to call the following url:
users/:user_pk/photos/:photo_pk/
To get only the photos related to the user having id=user_pk if the user exists, I have to extend the
get_queryset
method to be able to raiseNotFound
exception if no user with id=user_pk exists.Which is the best way to manage it since I'm performing a query on the DB and the
get_queryset
method is only sync in GenericAPIView, GenericViewSet, etc?The text was updated successfully, but these errors were encountered: