[Zope] change textfile

Stefan H. Holek stefan@epy.co.at
Wed, 24 Jul 2002 13:20:49 +0200

I suggest you install DocFinderEverywhere

You will then be easily able to find out that File's manage_edit takes the=20
following parameters:

self, title, content_type, precondition=3D'', filedata=3DNone, =

Your call should thus look something like (untested):
yourfile.manage_edit('yourtitle', 'text/html', filedata=3D'yourdata')


--On Mittwoch, 24. Juli 2002 12:58 +0200 Bj=F8rge Solli <bjorge@ii.uib.no>=20

> I am trying to make and change a textfile.
> I'm trying to do it this way:
> context.manage_addFile(id)
> getattr(context,id).manage_edit(title,data)
> This sets content_type(Property) to the value of data. I want to put the
> contents of data INTO the file, and have content_type to be text/html.
> Any suggestions?
> Thanks in advance.
> regards
> Bjorge
> --
Those who write software only for pay should go hurt some other field.
/Erik Naggum/