[Grok-dev] How do I use schema.Object?

Sebastian Ware sebastian at urbantalk.se
Tue Mar 10 10:00:02 EDT 2009

I am having difficulties understanding how to render forms using  
schema.Object. I have looked at various Zope 3 samples, but I am  
failing to translate it to Grok. The doctests I have found aren't  
helping me either.

Does anybody have some code that would successfully render and update  
an object field?

class IEvent(Interface):
     show_in_calendar = schema.Bool(title=u"Show in calendar")
     event_date = schema.Date(title=u'Date', required = False)

class INews(IStory):
     event = schema.Object(title=u"Event", schema = IEvent)

Mvh Sebastian

More information about the Grok-dev mailing list