I have created lots of API's list this using Django Rest Framework and it is working perfectly fine. But the issue i am facing is that when these API's are executed succesfully, then i am not getting Response like status=true or any response which says it executed successfully. Is there in-built function in rest framework or how can i do it to get success message.
# Add Trusty
class TrustyAddAPIView(generics.CreateAPIView):
queryset = TrustyRequest.objects.all()
serializer_class = serializers.TrustyAddSerialzer
permission_classes = [IsAuthenticated]
# User Trusty Profile Update
class TrustyUserProfileUpdateAPIView(generics.RetrieveUpdateAPIView):
queryset = User.objects.all()
serializer_class = serializers.UserDetailSerialzer
permission_classes = [IsAuthenticated]
2XXstatus code if the request succeeded. You could use the same to identify the status