You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/common/api/generic.py

22 lines
555 B

from rest_framework.viewsets import GenericViewSet, ModelViewSet
from rest_framework_bulk import BulkModelViewSet
from .mixin import CommonApiMixin, RelationMixin
from .permission import AllowBulkDestroyMixin
class JMSGenericViewSet(CommonApiMixin, GenericViewSet):
pass
class JMSModelViewSet(CommonApiMixin, ModelViewSet):
pass
class JMSBulkModelViewSet(CommonApiMixin, AllowBulkDestroyMixin, BulkModelViewSet):
pass
class JMSBulkRelationModelViewSet(CommonApiMixin, RelationMixin, AllowBulkDestroyMixin, BulkModelViewSet):
pass