[Grok-dev] Dolmen and its releases
Souheil CHELFOUH
trollfot at gmail.com
Thu Oct 22 10:57:00 EDT 2009
2009/10/22 Martin Aspeli <optilude+lists at gmail.com>:
> Souheil CHELFOUH wrote:
>> the field property is a property that handles the persistency of your
>> data transparently. And because code is always better than bad english
>> explanations:
>>
>>
>>>>> from persistent import Persistent
>>>>> from dolmen.file import FileProperty, FileField
>>>>> from zope.interface import Interface, implements
>>
>>>>> class IContent(Interface):
>> ... binary = FileField(title=u"Binary data")
>>
>>>>> class MyContent(Persistent):
>> ... implements(IContent)
>> ... binary = FileProperty(IContent['binary'])
>
> What does this do above and beyond just setting an object onto the
> instance (like plone.namedfile or zope.app.file or z3c.blobfile do)?
> Extra validation?
>
Have a look at the code itself
http://gitweb.dolmen-project.org/dolmen.file.git/blob/adf9207a69037e770838b35ed381ba942f6efdbf:/src/dolmen/file/property.py
> Martin
>
> --
> Author of `Professional Plone Development`, a book for developers who
> want to work with Plone. See http://martinaspeli.net/plone-book
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
>
More information about the Grok-dev
mailing list