forked from uncloud/uncloud
14 lines
479 B
Python
14 lines
479 B
Python
from rest_framework import viewsets, permissions
|
|
|
|
from .models import MatrixServiceProduct
|
|
from .serializers import MatrixServiceProductSerializer
|
|
|
|
class MatrixServiceProductViewSet(viewsets.ModelViewSet):
|
|
permission_classes = [permissions.IsAuthenticated]
|
|
serializer_class = MatrixServiceProductSerializer
|
|
|
|
def get_queryset(self):
|
|
return MatrixServiceProduct.objects.filter(owner=self.request.user)
|
|
def create(self, request):
|
|
# TODO
|
|
pass
|