Back to index

plone3  3.1.7
two53_two54.py
Go to the documentation of this file.
00001 from Products.CMFCore.utils import getToolByName
00002 
00003 PROF_ID = 'Products.CMFPlone:plone'
00004 
00005 def two53_two54(portal):
00006     """2.5.3 -> 2.5.4
00007     """
00008     out = []
00009     addGSSteps(portal, out)
00010 
00011     return out
00012 
00013 
00014 def addGSSteps(portal, out):
00015     """ Add import export steps in GS """
00016     setup_tool = getToolByName(portal, 'portal_setup', None)
00017     if setup_tool is not None:
00018         # only rerun when unset
00019         if not setup_tool.getBaselineContextID():
00020             # make sure the profile is there
00021             if PROF_ID in [i['id'] for i in setup_tool.listProfileInfo()]:
00022                 setup_tool.setBaselineContext('profile-' + PROF_ID)
00023     out.append('Set plone GS profile as default')