예제 #1
0
class FrontpageConfigSourceSchema(Schema):
    docChain = fields.Nested(FrontpageConfigDocChainSchema,
                             many=True,
                             required=True)
    contentType = fields.String(
        enum=settings.TRIDENTSTREAM_CONTENT_TYPES,
        enum_names=settings.TRIDENTSTREAM_CONTENT_TYPES_NAMES,
        default="",
    )
    template = fields.String(
        enum=settings.TRIDENTSTREAM_TEMPLATES,
        enum_names=settings.TRIDENTSTREAM_TEMPLATES_NAMES,
        default="cover",
        required=True,
    )
    query = fields.Nested(FrontpageConfigSourceQuerySchema, many=True)
    enabled = fields.Boolean()
예제 #2
0
class ListingSchema(Schema):
    name = fields.String(required=True)
    display_name = fields.String(default="", ui_schema={"ui:title": "Name"})
    levels = fields.Nested(ListingLevelSchema, many=True, default=list)
    histories = fields.List(
        RelatedPluginField(plugin_type=HistoryPlugin), many=True, default=list
    )
    rebuild_automatically = fields.Boolean(default=True)
예제 #3
0
class FilesystemInputSchema(Schema):
    priority = fields.Integer(default=10)
    db = RelatedPluginField(plugin_type=DatabasePlugin, required=True)
    metadata_parsers = fields.List(
        RelatedPluginField(plugin_type=MetadataParserPlugin),
        many=True,
        default=list)
    paths = fields.Nested(PathSchema, many=True, default=list)
    notifier = RelatedPluginField(plugin_type=NotifierPlugin)
예제 #4
0
class ItemInfoSchema(Schema):
    item_infos = fields.Nested(ItemInfoTypeSchema, many=True)
예제 #5
0
class FrontpageConfigRootSchema(Schema):
    sections = fields.Nested(FrontpageConfigSchema, many=True)
예제 #6
0
class FrontpageConfigSchema(Schema):
    title = fields.String(required=True)
    sources = fields.Nested(FrontpageConfigSourceSchema,
                            many=True,
                            required=True)
    enabled = fields.Boolean()
예제 #7
0
class SectionServiceSchema(BaseSchema):
    sections = fields.Nested(SectionSchema, many=True, default=list)
예제 #8
0
class SectionSchema(ListingSchema):
    inputs = fields.Nested(SectionInputSchema, many=True, default=list)
예제 #9
0
class StoreSchema(ListingSchema):
    searchers = fields.Nested(StoreSearcherSchema, many=True, default=list)
    rebuild_automatically = fields.Boolean(default=False)
예제 #10
0
class RemoteFilesystemServiceSchema(Schema):
    inputs = fields.Nested(RemoteFilesystemInputSchema, many=True)
예제 #11
0
class RemoteSearcherServiceSchema(Schema):
    searchers = fields.Nested(RemoteSearcherSchema, many=True)
    availability = RelatedPluginField(plugin_type=MetadataHandlerPlugin,
                                      traits=["availability"])