[Twisted-web] On Flatteners and Adapters
psanchez at nortel.com
Fri Aug 19 17:14:34 MDT 2005
I'm trying to implement a menu with the attached code, but it fails with
the following error:
exceptions.NotImplementedError: There is no flattener function
registered for object <Menu object at 0xb76dd42c> of type <class
<Menu object at 0xb76dd42c>
children=[<Menu object at
I'm using http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286260
as a reference for this sample implementation. The idea is to define two
objects, Menu and MenuItem, and then to define and to register adapters
for each object type.
I don't understand why it complains about flatteners not defined. Isn't
that covered by the registered adapters? I'd appreciate any help.
PS. I test the program running:
$ twistd -noy menu.py
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1791 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20050819/db8e7765/menu.py
More information about the Twisted-web