jumpserver/apps/common/drf/api.py

43 lines
1.4 KiB
Python
Raw Normal View History

2020-07-06 03:14:20 +00:00
from rest_framework.viewsets import GenericViewSet, ModelViewSet
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 (
SerializerMixin2, QuerySetMixin, ExtraFilterFieldsMixin, PaginatedResponseMixin,
RelationMixin, AllowBulkDestoryMixin
2020-07-09 07:41:02 +00:00
)
2020-07-06 03:14:20 +00:00
2020-07-09 07:41:02 +00:00
class JmsGenericViewSet(SerializerMixin2,
QuerySetMixin,
ExtraFilterFieldsMixin,
PaginatedResponseMixin,
GenericViewSet):
2020-07-06 03:14:20 +00:00
pass
2020-07-09 07:41:02 +00:00
class JMSModelViewSet(SerializerMixin2,
QuerySetMixin,
ExtraFilterFieldsMixin,
PaginatedResponseMixin,
ModelViewSet):
2020-07-06 03:14:20 +00:00
pass
class JMSBulkModelViewSet(SerializerMixin2,
QuerySetMixin,
ExtraFilterFieldsMixin,
PaginatedResponseMixin,
AllowBulkDestoryMixin,
BulkModelViewSet):
pass
class JMSBulkRelationModelViewSet(SerializerMixin2,
QuerySetMixin,
ExtraFilterFieldsMixin,
PaginatedResponseMixin,
RelationMixin,
AllowBulkDestoryMixin,
BulkModelViewSet):
pass