Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class TestSerializer(serializers.Serializer):
some_char_field = serializers.CharField()
some_int_field = serializers.IntegerField()
some_bool_field = serializers.NullBooleanField()
class TestSet(viewsets.GenericViewSet):
serializer_class = TestSerializer
Simple update test
def create(self, request):
serializer = TestSerializer(
return Response(
def list(self, request):
return Response([1, 2, 3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.