[Twisted-Python] Woven: access to submodels
Christopher Armstrong
radix at twistedmatrix.com
Sat Jul 19 16:39:05 MDT 2003
On Sat, Jul 19, 2003 at 03:24:38PM -0700, Donovan Preston wrote:
>
> On Saturday, July 19, 2003, at 1:15PM, Christopher Armstrong wrote:
>
> >On Sat, Jul 19, 2003 at 12:08:35PM -0700, Donovan Preston wrote:
> >
> >>As Moshe said in his reply, currently the URL traversal process is
> >>synchronous, so if you need to wait on a Deferred to construct the
> >>next URL segment Resource you're going to be doing a lot more work
> >>than you should have to.
> >
> >However, there is (now) a twisted.web.util.DeferredResource. Any time
> >a Resource is expected of you, but all you have is a Deferred that
> >will eventually result in a Resource, you can wrap the Deferred up in
> >one of these babies, and it'll DTRT. It's not necessary most of the
> >time, but it can be extremely useful.
>
> Thank you for moving that into util. However, it doesn't support
> chaining -- the thing that is returned will be rendered. So it's no
> different than what I suggested.
Chaining? I don't understand. It can be getChilded, if that's what you
mean. Or do you mean a DeferredResource wrapping a Deferred wrapping a
DeferredResource wrapping a Deferred resulting in something else? I
don't see why that would be a problem, but I haven't tried it.
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://twistedmatrix.com/users/radix.twistd/
More information about the Twisted-Python
mailing list