def installTemplateInZodb(folder, template): obj = ZopePageTemplate(template.getId(), template._text, template.content_type) obj.expand = 0 obj.write(template.read()) id = obj.getId() folder._setObject(id, obj)
def _createZODBClone(self): """Create a ZODB (editable) equivalent of this object.""" obj = ZopePageTemplate(self.getId(), self._text, self.content_type) obj.expand = 0 obj.write(self.read()) return obj