jumpserver/apps/common/drf/api.py

34 lines
813 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 (
2022-04-02 10:35:46 +00:00
RelationMixin, AllowBulkDestroyMixin, CommonApiMixin
2020-07-09 07:41:02 +00:00
)
2020-07-06 03:14:20 +00:00
2022-04-02 10:35:46 +00:00
class JMSGenericViewSet(CommonApiMixin, GenericViewSet):
2020-07-06 03:14:20 +00:00
pass
2022-04-02 10:35:46 +00:00
class JMSViewSet(CommonApiMixin, ViewSet):
2020-07-06 03:14:20 +00:00
pass
2022-04-02 10:35:46 +00:00
class JMSModelViewSet(CommonApiMixin, ModelViewSet):
pass
2022-04-02 10:35:46 +00:00
class JMSReadOnlyModelViewSet(CommonApiMixin, ReadOnlyModelViewSet):
pass
2022-04-02 10:35:46 +00:00
class JMSBulkModelViewSet(CommonApiMixin, AllowBulkDestroyMixin, BulkModelViewSet):
pass
2022-04-02 10:35:46 +00:00
class JMSBulkRelationModelViewSet(CommonApiMixin,
RelationMixin,
AllowBulkDestroyMixin,
BulkModelViewSet):
pass