vendor/CMF/1.5.3/CMFSetup

view __init__.py @ 0:3ed006215eb6

Vendor import of CMF 1.5.3
author fguillaume
date Tue, 09 Aug 2005 10:47:34 +0000
parents
children
line source
1 ##############################################################################
2 #
3 # Copyright (c) 2004 Zope Corporation and Contributors. All Rights Reserved.
4 #
5 # This software is subject to the provisions of the Zope Public License,
6 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10 # FOR A PARTICULAR PURPOSE.
11 #
12 ##############################################################################
13 """ CMFSetup product initialization.
15 $Id: __init__.py 37118 2005-07-07 16:52:34Z regebro $
16 """
18 from AccessControl import ModuleSecurityInfo
20 from interfaces import BASE, EXTENSION
21 from permissions import ManagePortal
22 from registry import _profile_registry as profile_registry
24 security = ModuleSecurityInfo( 'Products.CMFSetup' )
25 security.declareProtected( ManagePortal, 'profile_registry' )
27 def initialize( context ):
29 from Products.CMFCore.utils import ToolInit, registerIcon
30 from tool import SetupTool
33 ToolInit( 'CMF Setup Tool'
34 , tools=[ SetupTool ]
35 , icon=None
36 ).initialize( context )
38 registerIcon( SetupTool, 'www/tool.png', globals() )
40 from factory import addConfiguredSiteForm
41 from factory import addConfiguredSite
43 # Add factory for a site which follows a profile. We specify
44 # meta_type and interfaces because we don't actually register a
45 # class here, only a factory.
46 context.registerClass( meta_type='Configured CMF Site'
47 , constructors=( addConfiguredSiteForm
48 , addConfiguredSite
49 )
50 , permissions=( 'Add CMF Sites', )
51 , interfaces=None
52 )