Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalThemesTool::PortalThemesTool::manage_xmlImport (   self,
  file,
  options,
  plugin = 'CPSSkinsImporter',
  REQUEST = None 
)

Import a theme from a zip file in XML format (CPSIO)

Definition at line 1050 of file PortalThemesTool.py.

                                      :
        """Import a theme from a zip file in XML format (CPSIO)
        """

        psm = ''
        io_tool = getToolByName(self, 'portal_io', None)
        if io_tool is None:
            return

        utool = getToolByName(self, 'portal_url')
        portal = utool.getPortalObject()

        filename = basename(file.filename)
        _writeFileInImportDirectory(file, filename)

        importer = io_tool.getImportPlugin(plugin, portal)
        try:
            importer.setOptions(filename, options=options)
            importer.importFile()
            importer.finalize()
            psm = 'cpsio_psm_import_successful'
        except (ValueError, IOError), err:
            psm = err
        _deleteFileInImportDirectory(filename)
        return psm

    security.declareProtected(ManageThemes, 'manage_rebuild')
    def manage_rebuild(self, REQUEST=None, **kw):


Generated by  Doxygen 1.6.0   Back to index