[Zope-dev] Referring to same interface using zope.schema.Object
Robert Niederreiter
rnix at squarewave.at
Fri Jul 22 09:30:43 EDT 2011
Hi,
On 22.07.2011 12:59, Joe Steeve wrote:
> Hello,
>
> I am trying to construct an object tree.
Take a look at http://pypi.python.org/pypi/node
This is probably what you need.
Regards, Robert
> Every node in the tree is of
> the same type. I am trying to achieve something like:
>
> class INode(Interface):
>
> parent = Object(
> title=u"Parent node",
> schema=INode
> )
>
> children = List(
> title=u'Child nodes',
> value_type=Object(schema=INode)
> )
>
> The above fails with "NameError: name 'INode' is not defined". Any clues
> as to how to solve this?
>
> Regards,
> Joe
>
>
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev at zope.org
> https://mail.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope )
--
Robert Niederreiter
Squarewave Computing
Aflingerstraße 19
A-6176 Völs
Tel: +43 699 160 20 192
Web: http://www.squarewave.at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-dev/attachments/20110722/07a14d4d/attachment.html
More information about the Zope-Dev
mailing list