django-orchestra-test/orchestra/contrib/saas/api.py

17 lines
424 B
Python
Raw Normal View History

2023-07-09 07:51:51 +00:00
from rest_framework import viewsets
from orchestra.api import router, LogApiMixin
from orchestra.contrib.accounts.api import AccountApiMixin
from .models import SaaS
from .serializers import SaaSSerializer
class SaaSViewSet(LogApiMixin, AccountApiMixin, viewsets.ModelViewSet):
queryset = SaaS.objects.all()
serializer_class = SaaSSerializer
filter_fields = ('name',)
router.register(r'saas', SaaSViewSet)