[Twisted-web] Streaming render

Maarten ter Huurne maarten at treewalker.org
Thu Sep 6 20:32:18 EDT 2007

On Friday 07 September 2007, Tristan Seligmann wrote:

> I'm rendering a page, basically consisting of an HTML table of results
> plus various fluff. In order to generate these results, I fire off an
> asynchronous operation to which I pass a callback; the callback is then
> invoked once per result, corresponding to a row in the resulting table.
> Currently I'm just firing the operation off in beforeRender, building up
> a list as an instance attribute on the class in question, and then
> preceeding with the rendering, using that list in a renderer later.

I don't know "beforeRender", is a method from Nevow?

In the old web module, you can just call "write" on the request object 
whenever you have rendered part of the page and end by calling "finish".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20070907/eaebbf62/attachment.pgp

More information about the Twisted-web mailing list