t.w.t.flatten(request, root, write) : function documentation

Part of twisted.web.template View Source

Incrementally write out a string representation of root using write.

In order to create a string representation, root will be decomposed into simpler objects which will themselves be decomposed and so on until strings or objects which can easily be converted to strings are encountered.

ParametersrequestA request object which will be passed to the render method of any IRenderable provider which is encountered.
rootAn object to be made flatter. This may be of type unicode, bytes, slot, Tag, tuple, list, GeneratorType, Deferred, or something that provides IRenderable.
writeA callable which will be invoked with each bytes produced by flattening root.
ReturnsA Deferred which will be called back when root has been completely flattened into write or which will be errbacked if an unexpected exception occurs.
API Documentation for Twisted, generated by pydoctor at 2015-01-30 14:14:53.