[Zope] RE:Newbie: creating objects programmatically
Richard Jennings
rjennings@stradefi.com
Wed, 14 May 2003 11:50:24 +0200
Thanks to Dmitry and Maik, it works fine. So now I need to set the new ZTP contents
to those of a model ZPT. Following Dmitry's advice, I read the ZPT source and
figured I could do the following:
instance.manage_addProduct['PageTemplates'].manage_addPageTemplate('index_html')
instance['index_html'].write(instance.memberIndex.document_src(self))
but no, I get:
Error Type: Unauthorized
Error Value: You are not allowed to access document_src in this context
I am logged in as 'manager'. I have tried:
instance['index_html'].write(str(instance.memberIndex))
where memberIndex is a regular file and this works fine, but I want to use a model ZPT.
Guidance needed, please!
Richard
(every step an adventure!)