class QuestionSerializer(serializers.Serializer):

    def __init__(self, *args, **kwargs):
        remove_fields = kwargs.pop('remove_fields', None)
super(QuestionSerializer, self).__init__(*args, **kwargs)
if remove_fields:
    for field_name in remove_fields:
        self.fields.pop(field_name)


class QuestionWithoutTopicView(generics.RetrieveAPIView):
    pass
Dynamically exclude or include a field in Django REST framework serializer