2020-07-06 03:14:20 +00:00
|
|
|
from rest_framework.serializers import Serializer
|
2020-07-29 06:57:44 +00:00
|
|
|
from rest_framework.serializers import ModelSerializer
|
|
|
|
from rest_framework import serializers
|
|
|
|
from rest_framework_bulk.serializers import BulkListSerializer
|
|
|
|
|
|
|
|
from common.mixins.serializers import BulkSerializerMixin
|
|
|
|
from common.mixins import BulkListSerializerMixin
|
|
|
|
|
|
|
|
__all__ = ['EmptySerializer', 'BulkModelSerializer']
|
2020-07-06 03:14:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EmptySerializer(Serializer):
|
|
|
|
pass
|
2020-07-29 06:57:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BulkModelSerializer(BulkSerializerMixin, ModelSerializer):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class AdaptedBulkListSerializer(BulkListSerializerMixin, BulkListSerializer):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class CeleryTaskSerializer(serializers.Serializer):
|
|
|
|
task = serializers.CharField(read_only=True)
|