[Twisted-Python] Woven: access to submodels

Donovan Preston dp at twistedmatrix.com
Sat Jul 19 16:24:38 MDT 2003


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.

dp





More information about the Twisted-Python mailing list