source: products/quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/Extensions/Install.py @ 1593

Last change on this file since 1593 was 1593, checked in by mylan, 10 years ago

Add content from qPloneGoogleSitemaps. Fix all imports

  • Property svn:eol-style set to native
File size: 675 bytes
Line 
1from Products.CMFCore.utils import getToolByName
2
3PROFILE = "profile-quintagroup.plonegooglesitemaps:default"
4
5def install(self, reinstall=False):
6    """ Install skin with GenericSetup install profile
7    """
8    ps = getToolByName(self, 'portal_setup')
9    mtool = getToolByName(self, 'portal_migration')
10    plone_version = mtool.getFileSystemVersion()
11
12    if plone_version.startswith('3'):
13        # if this is plone 3.x
14        (ps.aq_base).__of__(self).runAllImportStepsFromProfile(PROFILE)
15    else:
16        active_context_id = ps.getImportContextID()
17        ps.setImportContext(PROFILE)
18        ps.runAllImportSteps()
19        ps.setImportContext(active_context_id)
Note: See TracBrowser for help on using the repository browser.