Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Cocommpyright (c) 2003-2005 Kupu Contributors. All rights reserved.
00004 #
00005 # This software is distributed under the terms of the Kupu
00006 # License. See LICENSE.txt for license text. For a list of Kupu
00007 # Contributors see CREDITS.txt.
00008 #
00009 ##############################################################################
00010 """Kupu Plone integration
00011 
00012 This package is a python package and contains a filesystem-based skin
00013 layer containing the necessary UI customization to integrate Kupu as a
00014 wysiwyg editor in Plone.
00015 
00016 $Id: __init__.py 39356 2007-02-24 14:38:50Z wiggy $
00017 """
00018 from App.Common import package_home
00019 from Products.CMFCore.DirectoryView import registerDirectory
00020 from Products.CMFCore import utils
00021 from Products.kupu.plone.plonelibrarytool import PloneKupuLibraryTool
00022 from Products.kupu import kupu_globals
00023 
00024 try:
00025     from Products.GenericSetup import profile_registry
00026     from Products.GenericSetup import BASE, EXTENSION
00027     from Products.CMFPlone.interfaces import IPloneSiteRoot
00028 except ImportError:
00029     profile_registry = None
00030 
00031 registerDirectory('plone/kupu_plone_layer', kupu_globals)
00032 registerDirectory('plone/kupu_references', kupu_globals)
00033 registerDirectory('tests', kupu_globals)
00034 
00035 def initialize(context):
00036     try:
00037         init = utils.ToolInit("kupu Library Tool",
00038                        tools=(PloneKupuLibraryTool,),
00039                        icon="kupu_icon.gif",
00040                        )
00041     except TypeError:
00042         # Try backward compatible form of the initialisation call
00043         init = utils.ToolInit("kupu Library Tool",
00044                        tools=(PloneKupuLibraryTool,),
00045                        product_name='kupu',
00046                        icon="kupu_icon.gif",
00047                        )
00048     init.initialize(context)
00049 
00050     if profile_registry is not None:
00051         profile_registry.registerProfile('default',
00052                                      'Kupu',
00053                                      'Extension profile for Kupu',
00054                                      'plone/profiles/default',
00055                                      'kupu',
00056                                      EXTENSION,
00057                                      for_=IPloneSiteRoot)
00058