на данном этапе все стандартно, инчего не переопределено.
class ClientSerializer(serializers.ModelSerializer):
class Meta:
model = Client
fields = ('user_id', 'user_name', 'is_admin', 'created')
class MessageSerializer(serializers.ModelSerializer):
class Meta:
model = Message
fields = ('client', 'text', 'created')
views.pyclass ClientViewSet(viewsets.ModelViewSet):
queryset = Client.objects.all()
serializer_class = ClientSerializer
class MessageViewSet(viewsets.ModelViewSet):
queryset = Message.objects.all()
serializer_class = MessageSerializer