[Twisted-Python] Woven Model extreme pain

Bill Gribble grib at billgribble.com
Fri Oct 3 08:26:56 EDT 2003


On Fri, 2003-10-03 at 03:32, Syver Enstad wrote:
> <span model="foo" view="Widget">
>   <span model="0" view="Text"></span>
> </span>
> 
> should work because the Widget handles the deferred model and
> postpones processing of child nodes until the deferred result is
> ready.

Could you elaborate on this a little?  I want to do this too (defer
rendering in Woven) and I use Widget subclasses everywhere.   At what
point is it OK to produce a Deferred?  

The only method I override in my Widget subclasses is setUp.   In my
top-level Page subclass I have a single wvfactory_ method for a special
View I use, and a getDynamicChild to fetch children (in this case, all
the children are dynamic).

Are you suggesting that I return a Deferred instead of a View from the
wvfactory_ method?  Or that I return a Deferred from the getDynamicChild
method?  Or what? 

Thanks,
b.g.








More information about the Twisted-Python mailing list