Back to index

plone3  3.1.7
Functions
CMFPlone.migrations.v2_5.alphas Namespace Reference

Functions

def two5_alpha1
def alpha1_alpha2
def installPlacefulWorkflow
def installPlonePAS
def installDeprecated
def installPortalSetup

Function Documentation

2.5-alpha1 -> 2.5-alpha2

Definition at line 34 of file alphas.py.

00034 
00035 def alpha1_alpha2(portal):
00036     """2.5-alpha1 -> 2.5-alpha2
00037     """
00038     out = []
00039 
00040     # Make the portal a Zope3 site
00041     enableZope3Site(portal, out)
00042 
00043     # register some tools as utilities
00044     registerToolsAsUtilities(portal, out)
00045 
00046     # Install PlonePAS
00047     installPlonePAS(portal, out)
00048 
00049     # Install plone_deprecated skin
00050     installDeprecated(portal, out)
00051 
00052     return out
00053 

Here is the call graph for this function:

Definition at line 69 of file alphas.py.

00069 
00070 def installDeprecated(portal, out):
00071     # register login skin
00072     st = getToolByName(portal, 'portal_skins', None)
00073     if st is None:
00074         return
00075     if not hasattr(aq_base(st), 'plone_deprecated'):
00076         createDirectoryView(st, 'Products.CMFPlone:skins/plone_deprecated')
00077         out.append('Added directory view for plone_deprecated')
00078 
00079     # add deprecated skin to default skins
00080     skins = ['Plone Default', 'Plone Tableless']
00081     selections = st._getSelections()
00082     for s in skins:
00083         if not selections.has_key(s):
00084            continue
00085         path = st.getSkinPath(s)
00086         path = [p.strip() for p in  path.split(',')]
00087         if not 'plone_deprecated' in path:
00088             if 'plone_3rdParty' in path:
00089                 path.insert(path.index('plone_3rdParty'), 'plone_deprecated')
00090             else:
00091                 path.append('plone_deprecated')
00092             st.addSkinSelection(s, ','.join(path))
00093             out.append('Added plone_deprecated to %s' % s)
00094 

Here is the call graph for this function:

Here is the caller graph for this function:

Quickinstalls CMFPlacefulWorkflow if not installed yet.

Definition at line 54 of file alphas.py.

00054 
00055 def installPlacefulWorkflow(portal, out):
00056     """Quickinstalls CMFPlacefulWorkflow if not installed yet."""
00057     # CMFPlacefulWorkflow is not installed by e.g. tests
00058     if 'CMFPlacefulWorkflow' in portal.Control_Panel.Products.objectIds():
00059         installOrReinstallProduct(portal, 'CMFPlacefulWorkflow', out)
00060 

Here is the call graph for this function:

Here is the caller graph for this function:

Quickinstalls PlonePAS if not installed yet.

Definition at line 61 of file alphas.py.

00061 
00062 def installPlonePAS(portal, out):
00063     """Quickinstalls PlonePAS if not installed yet."""
00064     NO_PLONEPAS = os.environ.get('SUPPRESS_PLONEPAS_INSTALLATION',None)=='YES'
00065     if not NO_PLONEPAS:
00066         installOrReinstallProduct(portal, 'PasswordResetTool', out)
00067         installOrReinstallProduct(portal, 'PlonePAS', out)
00068 

Here is the call graph for this function:

Here is the caller graph for this function:

Adds portal_setup if not installed yet.

Definition at line 95 of file alphas.py.

00095 
00096 def installPortalSetup(portal, out):
00097     """Adds portal_setup if not installed yet."""
00098     if SETUP_TOOL_ID not in portal.objectIds():
00099         portal._setObject(SETUP_TOOL_ID, SetupTool(SETUP_TOOL_ID))
00100         out.append('Added setup_tool.')

Here is the caller graph for this function:

2.1.2 -> 2.5-alpha1

Definition at line 14 of file alphas.py.

00014 
00015 def two5_alpha1(portal):
00016     """2.1.2 -> 2.5-alpha1
00017     """
00018     out = []
00019 
00020     # Make the portal a Zope3 site
00021     enableZope3Site(portal, out)
00022 
00023     # register some tools as utilities
00024     registerToolsAsUtilities(portal, out)
00025 
00026     # Install portal_setup
00027     installPortalSetup(portal, out)
00028 
00029     # Install CMFPlacefulWorkflow
00030     installPlacefulWorkflow(portal, out)
00031 
00032     return out
00033 

Here is the call graph for this function: