Hi Rob!
Modified: GenericSetup/trunk/PageTemplates/exportimport.py
===================================================================
--- GenericSetup/trunk/PageTemplates/exportimport.py 2006-05-15 13:59:50 UTC
(rev 68136)
+++ GenericSetup/trunk/PageTemplates/exportimport.py 2006-05-15 20:02:31 UTC
(rev 68137)
@@ -27,10 +27,14 @@
__used_for__ = IPageTemplate
+ mime_type = 'text/html'
+ suffix = '.pt'
+ supported_meta_type = 'Page Template'
+
def _exportBody(self):
"""Export the object as a file body.
"""
- if self.context.meta_type == 'Page Template':
+ if self.context.meta_type == self.supported_meta_type:
return self.context.read()
return None
@@ -40,7 +44,3 @@
self.context.write(body)
body = property(_exportBody, _importBody)
-
- mime_type = 'text/html'
-
- suffix = '.pt'
I'm trying to understand that checkin.
I don't think it is generally a good idea to limit exports to specific
meta_types. I just did that in the FolderXMLAdapter to make sure there
is no overlapping with the content handler.
But given there *is* a problem with using self.context.read()for other
meta_types than 'Page Template': Why would anybody want to override
supported_meta_type and use _exportBody for other meta_types?
Cheers,
Yuppie
_______________________________________________
Zope-CMF maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests