Can't use 'document_src' in python script - any alternatives?
Hi all, This is a rehash of a XXX-PythonMethod (remember them!) I had this at the top of my original XXX-PythonMethod import DocumentTemplate savedir = self.savedir template_str = self.template.read_raw() template = DocumentTemplate.HTML(template_str) ...and further on... theresult = template(self, results=results, identifier=identifier) return theresult (ie it gets a DTML method called 'template' and then fills in the <dtml-var results> and <dtml-var identifier> areas to create a filled-in document) But the PythonScript complained a bit, so I changed it to import DocumentTemplate self = context REQUEST = self.REQUEST savedir = self.savedir # template_str = self.template.read_raw() template_str = self.template.document_src() template = DocumentTemplate.HTML(template_str) But it still doesn't want to let me touch document_src (it also complained about read_raw). Is there a better way of doing this using PythonScripts and the like? TIA Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
participants (1)
-
Tony McDonald