[Grok-dev] schema.Object
Souheil CHELFOUH
trollfot at gmail.com
Wed Jul 21 08:45:51 EDT 2010
grok.implements only just declares the implementation, it does not do
it for you.
You might want to declare the attributes explicitly, with FieldProperty.
from zope.schema.fieldproperty import FieldProperty
class FooField(grok.Model):
grok.implements(IFooField)
attr1 = FieldProperty(IFooField["attr1"])
....
Then, this class will be instanciated by the widget and persisted.
Is that clear enough ?
For automatic implements => attrs creation, you can have a look at
dolmen.content
- Souheil
2010/7/21 Sascha Boch <sascha.boch at gmx.de>:
> Ok, and grok.implements(IFooField) is not sufficient for this? What else do
> I need to do? And from what class does FooField need to inherit?
>
> Thanks again,
> Sascha
>
>
>
> --
> Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
> Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
> _______________________________________________
> 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