Answer the question
In order to leave comments, you need to log in
How to disable Unauthorized response from DRF?
Good day to all.
I have a class that inherits generics.ListAPIView.
Inside the class, I changed permission_classes = [IsAuthenticatedOrReadOnly]
When a request is sent with a token in the header, I get a 401 error, if I don’t pass the token in the header, I get the information that the class should give out.
How to make it so that when permission_classes = [IsAuthenticatedOrReadOnly] Exception is not raised even when passing an invalid token?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question