[Zope3-Users] Create complex object

Frank Burkhardt fbo2 at gmx.net
Thu May 25 03:19:39 EDT 2006


On Thu, May 25, 2006 at 02:45:04AM +0200, Achim Domma wrote:

[snip]

Just create another interface:

> class IWorkspace(Interface):
>     title = TextLine(
>        title=u"Title",
>        description=u"The title",
>        default=u"proCoders Workspace",
>        required=True)
>     projects = Container(title=u"Projects", description=u"xxx")
>     articles = Container(title=u"Articles", description=u"xxx")

can be written as:

> class IWorkspaceForAdding(Interface):
>     title = TextLine(
>        title=u"Title",
>        description=u"The title",
>        default=u"proCoders Workspace",
>        required=True)
> class IWorkspace(IWorkspaceForAdding):
>     projects = Container(title=u"Projects", description=u"xxx")
>     articles = Container(title=u"Articles", description=u"xxx")

and replace the schema IWorkspace by IWorkspaceForAdding in the addform.

Regards,

Frank


More information about the Zope3-users mailing list