[Zope-CMF] GenericSetup and Zope 2.8.5
robert rottermann
robert at redcor.ch
Sun Mar 26 06:55:37 EST 2006
Hi there,
I started to look into GenerigSetup.
Wat I would like to to is to replace functionalities we have in a
similar product of our own (RedPick)
with GernericSetup.
Now my first question:
Does GenericSetup work with Zope 2.8.5 at all?
If yes:
in an instance of class of which the the relevant part is attach at the
end of this email
I call XX.exportSiteToFile(..)
It works insofar as I can call it from our tool (in a Plone 2.1.2 Site)
and it
does not generate any errors. However it does not produce any output.
I debugged it as far as
GenericSetup.utils.exportObjects
..
exporter = zapi.queryMultiAdapter((obj, context), IBody)
..
body = exporter.body
body is None therefor nothing happens.
Now my question:
what do I have to do to get an exporter with a body?
thanks
robert
Here the class definition:
has_setup_tool = 0
*try*:
from Products import GenericSetup
*try*:
from Products.CMCore.exportimport import actions
from Products.CMCore.exportimport import typeinfo
has_setup_tool = 1
*except*:
/# verbatim copy of exportimport from/
/# Plone.2.5 CMFCore /
*try*:
from Products.RedPick.exportimport import actions
from Products.RedPick.exportimport import typeinfo
has_setup_tool = 1
*except*:
*pass*
*except*:
*pass*
*class* handle_action_properties( handle_base ):
"RedPick handler for action properties."
/# interface to CMFSetup/
*def* exportSiteToFile( self, **kwargs ):
"Export current site information to external file."
/#return self.writeToFile( self.getFromSite( **kwargs ) )/
*if* has_setup_tool:
context = GenericSetup.context.DirectoryExportContext(self.portal.red_pick_tool, os.path.split(self.filename)[0])
actions.exportActionProviders(context)
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: robert.vcf
Type: text/x-vcard
Size: 200 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20060326/a7d81afb/robert.vcf
More information about the Zope-CMF
mailing list