[Twisted-web] fragments with child lookup

Markus Schiltknecht markus at bluegap.ch
Mon Sep 25 05:01:12 CDT 2006


Valentino Volonghi aka Dialtone wrote:
> On Mon, 25 Sep 2006 09:32:59 +0200, Markus Schiltknecht 
> <markus at bluegap.ch> wrote:
>> Here is what I think is more nevow like:
> 
> It is indeed much better than the solution used before.

Okay, thanks. But now... how can I remove the hard-coded 'level' number? 
I would like to write 'components' or Fragments which don't care on what 
level they are used.

Currently, the level is hard coded at the docFactory (which level of the 
content renderer to use) as well as in the renderers (which dictionary 
to use). Writing a common renderer, which returns the right Fragment 
seems non trivial. In a way, it's what I'm trying to do all the time.

Another thing that bugs me is the duplicate definition of the children: 
I have to set the child_XY attribute as well as the fragment dictionary. 
But that can easily be avoided, I think.

Regards

Markus



More information about the Twisted-web mailing list