Skip to content

file_metadata_serializer#

FileMetadataSerializer#

Bases: CommonModelSerializer

Source code in src/apps/core/serializers/file_metadata_serializer.py
class FileMetadataSerializer(CommonModelSerializer):
    file_type = FileType.get_serializer_class()(required=False)
    use_category = UseCategory.get_serializer_class()(required=True)

    class Meta:
        model = FileSetFileMetadata
        fields = ["title", "description", "file_type", "use_category"]

DirectoryMetadataSerializer#

Bases: CommonModelSerializer

Source code in src/apps/core/serializers/file_metadata_serializer.py
class DirectoryMetadataSerializer(CommonModelSerializer):
    use_category = UseCategory.get_serializer_class()(required=True)

    class Meta:
        model = FileSetDirectoryMetadata
        fields = ["title", "description", "use_category"]