Field storage tells how the value of schema field is stored.
This is recommended for data which is always read
when the object is accessed:
creates an object attribute
which is an
uses buckets as the smallest persistent entity. A
bucket usually holds a small number of items. Buckets are
loaded on request and as needed compared to using native
It is safe to assume that you can fit few variables to one bucket easily.
You also might want to define
accessor if you are using this storage. This allows you to
read the object value using standard Python attribute
Note that in this case the access goes through AT accessor and mutator functions. This differs from raw storage value access: for example the AT accessor encodes strings to UTF-8 before returning them.
VariantProductSchema['myField'].storage = atapi.AnnotationStorage() class VariantProduct(folder.ATFolder): meta_type = "VariantProduct" schema = VariantProductSchema myField = atapi.ATFieldProperty('title') product = VariantProduct() product.setMyField("foobar") # Set field using AT mutator method products.myField = # AT field property magic. This is equal to product.getMyField()
This stores field values in an external SQL database.
Store the raw values of fields on the file system.
# Usual Zope/CMF/Plone/Archetypes imports ... from iw.fss.FileSystemStorage import FileSystemStorage ... my_schema = Schema(( FileField('file', ... storage=FileSystemStorage(), widget=FileWidget(...) ), ... )) ...