Back to index

plone3  3.1.7
Functions | Variables
CMFEditions.setuphandlers Namespace Reference

Functions

def importVarious

Variables

dictionary VERSIONING_ACTIONS
tuple ADD_POLICIES
tuple DEFAULT_POLICIES = ('at_edit_autoversion', 'version_on_revert')

Detailed Description

CMFEditions setup handlers.

Function Documentation

Import various settings.

Provisional handler that does initialization that is not yet taken
care of by other handlers.

Definition at line 32 of file setuphandlers.py.

00032 
00033 def importVarious(context):
00034     """
00035     Import various settings.
00036 
00037     Provisional handler that does initialization that is not yet taken
00038     care of by other handlers.
00039     """
00040     # Only run step if a flag file is present
00041     if context.readDataFile('cmfeditions_various.txt') is None:
00042         return
00043     site = context.getSite()
00044     portal_modifier = getToolByName(site, 'portal_modifier')
00045     StandardModifiers.install(portal_modifier)
00046     portal_repository = getToolByName(site, 'portal_repository')
00047     portal_repository.setAutoApplyMode(True)
00048     portal_repository.setVersionableContentTypes(VERSIONING_ACTIONS.keys())
00049     portal_repository._migrateVersionPolicies()
00050     portal_repository.manage_changePolicyDefs(ADD_POLICIES)
00051     for ctype in VERSIONING_ACTIONS:
00052         for policy_id in DEFAULT_POLICIES:
00053             portal_repository.addPolicyForContentType(ctype, policy_id)

Here is the call graph for this function:


Variable Documentation

Initial value:
00001 (('at_edit_autoversion',
00002                     'Create version on edit (AT objects only)',
00003                      ATVersionOnEditPolicy),
00004                  ('version_on_revert',
00005                     'Create version on version revert'),
00006                )

Definition at line 23 of file setuphandlers.py.

tuple CMFEditions.setuphandlers.DEFAULT_POLICIES = ('at_edit_autoversion', 'version_on_revert')

Definition at line 30 of file setuphandlers.py.

Initial value:
00001 {'Document':'version_document_view',
00002                       #'File':'version_file_view',
00003                       #'Image':'version_image_view',
00004                       'News Item':'version_news_item_view',
00005                       'ATDocument':'version_atdocument_view',
00006                       'Event': '',
00007                       'Link': '',
00008                       #'ATFile':'version_atfile_view',
00009                       #'ATImage':'version_atimage_view',
00010                       'ATNewsItem':'version_atnews_item_view',}

Definition at line 12 of file setuphandlers.py.