[Twisted-web] A question with storm orm and Nevow

Colin Alston karnaugh at karnaugh.za.net
Wed Jul 8 11:21:13 EDT 2009


On Wed, Jul 8, 2009 at 4:59 PM, Daniel Yang <daniel.yang.zhenyu at gmail.com>wrote:

> Hi people,
>
> I am using storm orm(twisted-integration) with Nevow.
> There is a question that confuses me a lot:
> (since storm orm(twisted-integration) does db io in a asynchronous way).
> In a render function, before my data returns, what should I return for the
> render function?
>
> does Nevow has something like server.NOT_DONE_YET?
> or there is a "deferred" way to do this?
>

Hi,

You can simply use a deferred in any render function as you would expect.
Nevow deals with this for you.

def render_foo(self, ctx, data):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20090708/f023d04b/attachment-0001.htm 


More information about the Twisted-web mailing list