[Twisted-Python] Woven and deferred models
Donovan Preston
dp at twistedmatrix.com
Mon Jul 14 18:39:52 MDT 2003
On Monday, July 14, 2003, at 8:51AM, Rich Cavanaugh wrote:
> I spent some time in #twisted this weekend looking for a solution to
> this and got some very helpful advice from phed and radix but no real
> solution to what looks like a bug.
>
> The attached rpy is an example of what I'm trying to do. As is woven
> doesn't even touch the child nodes of my model="main" tag. Add
> view="None" and it at least gives me a trace-back on model="name"
> which is a step beyond not touching it at all.
The solution is to use view="Widget" instead of view="None", which maps
to DefaultWidget, which does nothing at all. Widget at least has a
minimal amount of code, including the Deferred-model handling code. I
will try to fix DefaultWidget so that people are not surprised by
things like this any more.
>
> If anyone has a better approach to this problem I'd appreciate the
> input. Basically I have some models that will take some time to fully
> initialize due to lots of database activity. The sub-models need all
> of this data in place. I'm trying to find a way to fully initialize a
> model before woven continues on to it's sub-models.
This is exactly what Deferred-Model handling was written for, so you
are doing it "correctly" :-)
More information about the Twisted-Python
mailing list