uncloud-mravi/uncloud/ungleich_service/views.py

18 lines
521 B
Python
Raw Normal View History

from rest_framework import viewsets, permissions
from .models import MatrixServiceProduct
from .serializers import MatrixServiceProductSerializer
from uncloud_pay.helpers import ProductViewSet
class MatrixServiceProductViewSet(ProductViewSet):
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