[Zope] Stuffing file objects into my objects
Dieter Maurer
dieter@handshake.de
Fri, 14 Jun 2002 21:12:16 +0200
Damon Eckhoff writes:
> On 6/13/02 2:07 PM, "Dieter Maurer" <dieter@handshake.de> wrote:
>
> > The easiest solution is to use an attribute for your file object, say "file".
> > Then, you can simply use "<url_to_your_instance>/file".
> >
> > The next easiest solution is a method "viewFile" that uses
> > "getFile" to locate the file object and then calls its
> > "index_html".
> >
>
> Dieter, I appreciate the help...
>
> Okay, I created the viewFile method:
>
> def viewFile( self, REQUEST=None ):
> "Views the file"
> self._file.index_html( REQUEST, REQUEST.RESPONSE)
You must return the result of calling "index_html"!
return self._file.index_html( REQUEST, REQUEST.RESPONSE)
Dieter