2021-07-27 08:06:00 +00:00
|
|
|
from rest_framework.viewsets import GenericViewSet, ModelViewSet, ReadOnlyModelViewSet, ViewSet
|
2020-07-29 06:57:44 +00:00
|
|
|
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-07-08 06:23:18 +00:00
|
|
|
SerializerMixin, QuerySetMixin, ExtraFilterFieldsMixin, PaginatedResponseMixin,
|
|
|
|
RelationMixin, AllowBulkDestroyMixin, RenderToJsonMixin,
|
2020-07-09 07:41:02 +00:00
|
|
|
)
|
2020-07-06 03:14:20 +00:00
|
|
|
|
|
|
|
|
2021-07-08 06:23:18 +00:00
|
|
|
class CommonMixin(SerializerMixin,
|
2021-03-08 08:55:21 +00:00
|
|
|
QuerySetMixin,
|
|
|
|
ExtraFilterFieldsMixin,
|
|
|
|
PaginatedResponseMixin,
|
2021-03-08 08:55:21 +00:00
|
|
|
RenderToJsonMixin):
|
2021-03-08 08:55:21 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2021-07-27 08:06:00 +00:00
|
|
|
class JMSGenericViewSet(CommonMixin, GenericViewSet):
|
2020-07-06 03:14:20 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2021-07-27 08:06:00 +00:00
|
|
|
class JMSViewSet(CommonMixin, ViewSet):
|
2020-07-06 03:14:20 +00:00
|
|
|
pass
|
2020-07-29 06:57:44 +00:00
|
|
|
|
|
|
|
|
2021-07-27 08:06:00 +00:00
|
|
|
class JMSModelViewSet(CommonMixin, ModelViewSet):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class JMSReadOnlyModelViewSet(CommonMixin, ReadOnlyModelViewSet):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class JMSBulkModelViewSet(CommonMixin, AllowBulkDestroyMixin, BulkModelViewSet):
|
2020-07-29 06:57:44 +00:00
|
|
|
pass
|
2020-08-03 08:17:46 +00:00
|
|
|
|
|
|
|
|
2021-03-08 08:55:21 +00:00
|
|
|
class JMSBulkRelationModelViewSet(CommonMixin,
|
2020-08-03 08:17:46 +00:00
|
|
|
RelationMixin,
|
2021-07-08 06:23:18 +00:00
|
|
|
AllowBulkDestroyMixin,
|
2020-08-03 08:17:46 +00:00
|
|
|
BulkModelViewSet):
|
|
|
|
pass
|