list<Class>
который я заполняю данными.from django.db import models
class VM(models.Model):
name = models.CharField(max_length=60)
uid = models.IntegerField()
status = models.BooleanField()
def __str__(self):
return self.name
class VMViewSet(viewsets.ModelViewSet):
list = []
list.append( VM('axixa', 2,True))
queryset =list
serializer_class = VMSerializer()