예제 #1
0
class IAddons(Interface):

    enabled = schema.FrozenSet(title=_('Installed addons'),
                               defaultFactory=frozenset,
                               value_type=schema.TextLine(title='Value'),
                               description=_("""List of enabled addons"""))
예제 #2
0
class IBlockText(Interface):
    text = JSONField(schema=TEXT_SCHEMA)

    description = schema.TextLine()
예제 #3
0
class IBlockVideo(Interface):
    url = schema.TextLine()
class IEventConditionType(IConditionType):
    event_name = schema.TextLine()
예제 #5
0
class ITestSchema(Interface):

    text = schema.TextLine(required=False)
    integer = schema.Int(required=False)
    floating = schema.Float(required=False)
    list_of_text = schema.List(value_type=schema.TextLine(), required=False)
    tuple_of_text = schema.Tuple(value_type=schema.TextLine(), required=False)
    set_of_text = schema.Set(value_type=schema.TextLine(), required=False)
    frozenset_of_text = schema.FrozenSet(value_type=schema.TextLine(),
                                         required=False)
    dict_value = schema.Dict(key_type=schema.TextLine(),
                             value_type=schema.TextLine(),
                             required=False)
    datetime = schema.Datetime(required=False)
    date = schema.Date(required=False)
    time = schema.Time(required=False)

    patch_list = fields.PatchField(
        schema.List(value_type=schema.Dict(key_type=schema.Text(),
                                           value_type=schema.Text()),
                    required=False))
    patch_list_int = fields.PatchField(
        schema.List(value_type=schema.Int(), required=False))
    patch_dict = fields.PatchField(schema.Dict(key_type=schema.Text(),
                                               value_type=schema.Text()),
                                   required=False)

    patch_int = fields.PatchField(schema.Int(default=22), required=False)

    patch_int_no_default = fields.PatchField(schema.Int(), required=False)

    bucket_list = fields.BucketListField(
        bucket_len=10,
        required=False,
        value_type=schema.Dict(key_type=schema.Text(),
                               value_type=schema.Text()),
    )

    datetime_bucket_list = fields.BucketListField(bucket_len=10,
                                                  required=False,
                                                  value_type=schema.Datetime())

    union_field = schema.UnionField(schema.Datetime(),
                                    schema.Int(),
                                    required=False)
    union_field_obj = schema.UnionField(schema.Object(IObjectA),
                                        schema.Object(schema=IObjectB),
                                        required=False)

    nested_patch = fields.PatchField(
        schema.Dict(
            required=False,
            key_type=schema.Text(),
            value_type=fields.PatchField(
                schema.List(value_type=schema.Object(
                    schema=INestFieldSchema))),
        ))

    dict_of_obj = schema.Dict(
        required=False,
        key_type=schema.Text(),
        value_type=schema.Object(schema=INestFieldSchema))

    patch_dict_of_obj = fields.PatchField(
        schema.Dict(required=False,
                    key_type=schema.Text(),
                    value_type=schema.Object(schema=INestFieldSchema)))

    patch_tuple = fields.PatchField(
        schema.Tuple(required=False,
                     value_type=schema.Text(schema=INestFieldSchema)))

    bucket_dict = fields.BucketDictField(bucket_len=10,
                                         required=False,
                                         key_type=schema.Text(),
                                         value_type=schema.Text())
예제 #6
0
class ITestContent3(ITestContent2):
    foobar3 = schema.TextLine(required=False)
예제 #7
0
class ITestContent5(ITestContent4):
    foobar5 = schema.TextLine(required=False)
예제 #8
0
class ITestContent1(IItem):
    foobar1 = schema.TextLine()
예제 #9
0
class ITestContent2(ITestContent1):
    foobar2 = schema.TextLine()
예제 #10
0
class ILink(IItem):

    index_field('url', type='text')
    url = schema.TextLine(title=_('URL'), required=False)
예제 #11
0
class ITestBehavior(Interface):
    foobar = schema.TextLine(required=False)
    foobar_context = schema.TextLine(required=False, default='default-foobar')
예제 #12
0
class IRegistryData(Interface):
    foobar = schema.TextLine()
예제 #13
0
class IImageAttachment(Interface):

    image = CloudFileField()

    caption = schema.TextLine()
예제 #14
0
class ILayers(Interface):

    active_layers = schema.FrozenSet(title=_('Active Layers'),
                                     defaultFactory=frozenset,
                                     value_type=schema.TextLine(title='Value'))
예제 #15
0
class ITestContent1(IItem):
    foobar1 = schema.TextLine(required=False)
예제 #16
0
class ITestContent3(ITestContent2):
    foobar3 = schema.TextLine()
예제 #17
0
class ITestContent2(ITestContent1):
    foobar2 = schema.TextLine(required=False)
예제 #18
0
class ITestContent4(ITestContent3):
    foobar4 = schema.TextLine()
예제 #19
0
class ITestContent4(ITestContent3):
    foobar4 = schema.TextLine(required=False)
예제 #20
0
class ITestContent5(ITestContent4):
    foobar5 = schema.TextLine()
예제 #21
0
class ITestContent6(ITestContent5):
    foobar6 = schema.TextLine(required=False)
예제 #22
0
class ITestContent6(ITestContent5):
    foobar6 = schema.TextLine()
예제 #23
0
class IDublinCore(Interface):
    index_field("creators", type="keyword")
    index_field("tags", type="keyword")
    index_field("contributors", type="keyword")

    title = schema.TextLine(
        title="Title", description="The first unqualified Dublin Core 'Title' element value."
    )

    description = schema.Text(
        title="Description", description="The first unqualified Dublin Core 'Description' element value."
    )

    creation_date = schema.Datetime(
        title="Creation Date",
        description="The date and time that an object is created. " "\nThis is normally set automatically.",
    )

    modification_date = schema.Datetime(
        title="Modification Date",
        description="The date and time that the object was last modified in a\n" "meaningful way.",
    )

    effective_date = schema.Datetime(
        title="Effective Date", description="The date and time that an object should be published. "
    )

    expiration_date = schema.Datetime(
        title="Expiration Date", description="The date and time that the object should become unpublished."
    )

    creators = schema.Tuple(
        title="Creators",
        description="The unqualified Dublin Core 'Creator' element values",
        value_type=schema.TextLine(),
        required=False,
        naive=True,
        max_length=1000,
    )

    tags = PatchField(
        schema.Tuple(
            title="Tags",
            description="The unqualified Dublin Core 'Tags' element values",
            value_type=schema.TextLine(),
            required=False,
            naive=True,
            max_length=10000,
        )
    )

    publisher = schema.Text(
        title="Publisher", description="The first unqualified Dublin Core 'Publisher' element value."
    )

    contributors = schema.Tuple(
        title="Contributors",
        description="The unqualified Dublin Core 'Contributor' element values",
        value_type=schema.TextLine(),
        required=False,
        naive=True,
        max_length=10000,
    )
예제 #24
0
class ITestNoSerializeBehavior(Interface):
    foobar = schema.TextLine()
예제 #25
0
class IBlockDescription(Interface):
    description = schema.TextLine(required=True)
예제 #26
0
class IConversation(Interface):

    users = schema.List(value_type=schema.TextLine())
예제 #27
0
class IBlockImage(Interface):
    url = schema.TextLine()
예제 #28
0
class ITestBehavior3(Interface):
    foobar = schema.TextLine()
예제 #29
0
class IBlockTitle(Interface):
    title = schema.TextLine(required=True)
예제 #30
0
class ISchema(Interface):
    foo = schema.TextLine()