[Twisted-web] recursive tree renderer
Manlio Perillo
manlio_perillo at libero.it
Tue Jul 18 15:25:13 CDT 2006
dq_searchlores ha scritto:
> Hi there!
>
> I wrote a recursive tree renderer back in 09/2005. Perhaps this can be useful to
> other people, or even better if I get feedback from peer review :-)
>
> I've posted the TreeMixin at http://nanobin.nanosouffle.net/1492
> and a small sample app at http://nanobin.nanosouffle.net/1493
>
I came up with another solution: a generic (reusable) nested_sequence
renderer.
This functions is like the standard sequence render, but instead of
using the "standard" data, it calls a nested_'data_directive_name'
method of the Page instance.
For this to work, there is the need to store the last used data
directive in the context.
II will try to write some code.
I know this is an hack, but it seems to be a reusable pattern.
P.S.
I'm looking at DataFactory and I don't understand this:
if args:
return callable(*args)
What's happening here?
Thanks and regards Manlio Perillo
More information about the Twisted-web
mailing list