[Zope-dev] Writing results directly back to browser

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Thu, 11 Nov 1999 10:47:38 -0500 (EST)


On Wed, 10 Nov 1999, David S. Harrison wrote:

> for suggestions on a couple of fronts: how can I wire this infrastructure
> into DTML and how does one write directly back to the browser from
> an external method?
> 

Hi David -

You can actually just return the image file from the external method. For
instance if your method is called gen_im

def gen_im(self):
	imag=doimage...
	return imag

then going to its URL will actually return the image. You might want to
set the header through the Response object. Similarly you can just call
the external method from DTML.

(I think I am not clear but I haven't had my shakky coffee yet)

Pavlos