Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 """ GenericSetup product initialization.
00002 
00003 $Id: __init__.py 81996 2007-11-27 21:46:16Z yuppie $
00004 """
00005 
00006 from AccessControl import ModuleSecurityInfo
00007 
00008 from interfaces import BASE, EXTENSION
00009 from permissions import ManagePortal
00010 from registry import _profile_registry as profile_registry
00011 
00012 security = ModuleSecurityInfo('Products.GenericSetup')
00013 security.declareProtected(ManagePortal, 'profile_registry')
00014 
00015 def initialize(context):
00016 
00017     import tool
00018 
00019     context.registerClass(tool.SetupTool,
00020                           constructors=(#tool.addSetupToolForm,
00021                                         tool.addSetupTool,
00022                                         ),
00023                           permissions=(ManagePortal,),
00024                           interfaces=None,
00025                           icon='www/tool.png',
00026                          )
00027 
00028 # BBB: for setup tools created with CMF 1.5 if CMFSetup isn't installed
00029 try:
00030     import Products.CMFSetup
00031 except ImportError:
00032     import bbb
00033     import bbb.registry
00034     import bbb.tool
00035 
00036     __module_aliases__ = (('Products.CMFSetup', bbb),
00037                           ('Products.CMFSetup.registry', bbb.registry),
00038                           ('Products.CMFSetup.tool', bbb.tool))