class IModelFieldSchema(Interface): """Model field schema""" type_model = schema.ASCII(title="Type of model", default="tf") file = CloudFileField(title="Model binary file") version = schema.Int(title="Version of the model", default=1)
class IRichTextValue(Interface): """The value actually stored in a RichText field. This stores the following values on the parent object - A separate persistent object with the original value - A cache of the value transformed to the default output type The object is immutable. """ raw = schema.Text( title=_(u"Raw value in the original MIME type"), readonly=True, ) mimeType = schema.ASCIILine( title=_(u"MIME type"), readonly=True, ) outputMimeType = schema.ASCIILine( title=_(u"Default output MIME type"), readonly=True, ) encoding = schema.ASCIILine( title=_(u"Default encoding for the value"), description=_(u"Mainly used internally"), readonly=True, ) raw_encoded = schema.ASCII( title=_(u"Get the raw value as an encoded string"), description=_(u"Mainly used internally"), readonly=True, ) output = schema.Text( title=_(u"Transformed value in the target MIME type"), description=_(u"May be None if the transform cannot be completed"), readonly=True, required=False, missing_value=None, )
class IRichTextFieldSchema(Interface): """Rich text field schema""" content_type = schema.ASCII(title="Content type") data = schema.Text(title="Real data") encoding = schema.ASCII(title="Get the real encoding")
class IRichTextFieldSchema(Interface): """Rich text field schema""" content_type = schema.ASCII(title='Content type') data = schema.Text(title='Real data') encoding = schema.ASCII(title='Get the real encoding')