jumpserver/apps/common/drf/api.py

34 lines
792 B
Python
Raw Normal View History

from rest_framework.viewsets import GenericViewSet, ModelViewSet, ReadOnlyModelViewSet, ViewSet
from rest_framework_bulk import BulkModelViewSet
2020-07-06 03:14:20 +00:00
2020-07-09 07:41:02 +00:00
from ..mixins.api import (
2021-10-21 08:39:52 +00:00
RelationMixin, AllowBulkDestroyMixin, CommonMixin
2020-07-09 07:41:02 +00:00
)
2020-07-06 03:14:20 +00:00
class JMSGenericViewSet(CommonMixin, GenericViewSet):
2020-07-06 03:14:20 +00:00
pass
class JMSViewSet(CommonMixin, ViewSet):
2020-07-06 03:14:20 +00:00
pass
class JMSModelViewSet(CommonMixin, ModelViewSet):
pass
class JMSReadOnlyModelViewSet(CommonMixin, ReadOnlyModelViewSet):
pass
class JMSBulkModelViewSet(CommonMixin, AllowBulkDestroyMixin, BulkModelViewSet):
pass
class JMSBulkRelationModelViewSet(CommonMixin,
RelationMixin,
AllowBulkDestroyMixin,
BulkModelViewSet):
pass