api.v1.serializers.attachment_serializers.BaseAttachmentSerializer module¶
Module with the BaseAttachmentSerializer serializer class.
- class api.v1.serializers.attachment_serializers.BaseAttachmentSerializer.BaseAttachmentSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializerThe base serializer for
core.models.Attachment.Includes all viable fields from the model. Sets all constraints that must be implemented in all serializers. Other serializers for
core.models.Attachmentshould inherit from this.- class Meta[source]¶
Bases:
objectMetadata class for the base serializer.
Contains constraints that must be implemented by all serializers. Other serializer metaclasses should inherit from this.
read_only_fieldsandexcludemust not be shortened in subclasses.- model¶
The model to serialize.
alias of
Attachment
- exclude: ClassVar[list[str]] = ['file_path']¶
Exclude the
core.models.Attachment.Attachment.file_pathfield.
- read_only_fields: Final[list[str]] = ['file_name', 'content_disposition', 'content_id', 'content_maintype', 'content_subtype', 'datasize', 'email', 'created', 'updated']¶
The
core.models.Attachment.Attachment.is_healthy,core.models.Attachment.Attachment.datasize,core.models.Attachment.Attachment.email,core.models.Attachment.Attachment.createdandcore.models.Attachment.Attachment.updatedfields are read-only.
- _declared_fields = {}¶