D
Size: a a a
D
AO
MM
AO
MM
l
Е
T
l
AK
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
)
}
class PostDetailAPIView(RetrieveAPIView):
authentication_classes = [TokenAuthentication]
queryset = Post.objects.all()
serializer_class = PostDetailSerializers
permission_classes = [IsAuthenticated]
AK
DT
AK
AK
{
"detail": "Authentication credentials were not provided."
}
AK
DT
DT
AK