Back to index

plone3  3.1.7
Namespaces | Functions | Variables
CMFPlone Namespace Reference

Namespaces

namespace  ActionIconsTool
namespace  ActionsTool
namespace  browser
namespace  CalendarTool
namespace  CatalogTool
namespace  DiscussionTool
namespace  events
namespace  exportimport
namespace  Extensions
namespace  factory
namespace  FactoryTool
namespace  GroupDataTool
namespace  GroupsTool
namespace  i18nl10n
namespace  interfaces
namespace  InterfaceTool
namespace  LargePloneFolder
namespace  log
namespace  MemberDataTool
namespace  MembershipTool
namespace  migrations
namespace  MigrationTool
namespace  patches
namespace  PloneBaseTool
namespace  PloneBatch
namespace  PloneContent
namespace  PloneControlPanel
namespace  PloneFolder
namespace  PloneInitialize
namespace  PloneTool
namespace  Portal
namespace  PropertiesTool
namespace  QuickInstallerTool
namespace  RegistrationTool
namespace  setup
namespace  setuphandlers
namespace  SkinsTool
namespace  SyndicationTool
namespace  tests
namespace  ToolNames
namespace  TranslationServiceTool
namespace  TypesTool
namespace  UndoTool
namespace  unicodeconflictresolver
namespace  UnicodeSplitter
namespace  URLTool
namespace  utils
namespace  workflow
namespace  WorkflowTool

Functions

def initialize

Variables

tuple cmfplone_globals = globals()
list this_module = sys.modules[ __name__ ]
list _marker = []
string ADD_CONTENT_PERMISSION = 'Add portal content'
dictionary misc_
tuple PloneMessageFactory = MessageFactory('plone')
tuple PloneLocalesMessageFactory = MessageFactory('plonelocales')

Function Documentation

def CMFPlone.initialize (   context)

Definition at line 16 of file __init__.py.

00016 
00017 def initialize(context):
00018 
00019     # Stuff has been moved from module level to this method for a
00020     # better separation of import and installation.
00021     # For the general user this change does not make a difference.
00022     # For test authors (and people who use parts of Plone only)
00023     # it does speed up import *significantly*.
00024 
00025     from AccessControl import ModuleSecurityInfo
00026     from AccessControl import allow_module, allow_class
00027 
00028     # allow logging
00029     ModuleSecurityInfo('logging').declarePublic('getLogger')
00030     from logging import Logger
00031     allow_class(Logger)
00032 
00033     # Register kss extension to allow it used from fs skins
00034     from Products.CMFCore.DirectoryView import registerFileExtension
00035     from Products.CMFCore.FSFile import FSFile
00036     registerFileExtension('kss', FSFile)
00037 
00038     # various small utils functions
00039     # added for unescaping view names in urls when finding selected action
00040     ModuleSecurityInfo('urllib').declarePublic('unquote')
00041     
00042     allow_module('Products.CMFPlone.utils')
00043 
00044     # For form validation bits
00045     from Products.CMFPlone.utils import IndexIterator
00046     allow_class(IndexIterator)
00047 
00048     # Make IndexIterator available at module level
00049     this_module.IndexIterator = IndexIterator
00050 
00051     # For content_status_modify
00052     from Products.CMFCore.WorkflowCore import ObjectMoved, ObjectDeleted, \
00053                                               WorkflowException
00054     ModuleSecurityInfo('Products.CMFCore.WorkflowCore').declarePublic('ObjectMoved')
00055     ModuleSecurityInfo('Products.CMFCore.WorkflowCore').declarePublic('ObjectDeleted')
00056     ModuleSecurityInfo('Products.CMFCore.WorkflowCore').declarePublic('WorkflowException')
00057     allow_class(ObjectMoved)
00058     allow_class(ObjectDeleted)
00059     allow_class(WorkflowException)
00060 
00061     from PloneBatch import Batch
00062     allow_class(Batch)
00063 
00064     # Make Batch available at module level
00065     this_module.Batch = Batch
00066 
00067     from StringIO import StringIO
00068     allow_class(StringIO)
00069 
00070     # Make listPolicies importable TTW
00071     ModuleSecurityInfo('Products.CMFPlone.Portal').declarePublic('listPolicies')
00072 
00073     # Make Unauthorized importable TTW
00074     ModuleSecurityInfo('AccessControl').declarePublic('Unauthorized')
00075 
00076     # Make ConflictError importable TTW
00077     ModuleSecurityInfo('ZODB.POSException').declarePublic('ConflictError')
00078 
00079     # Make ZCTextIndex ParseError importable TTW
00080     ModuleSecurityInfo('Products.ZCTextIndex.ParseTree').declarePublic('ParseError')
00081 
00082     # Make DateTimeError importable TTW
00083     ModuleSecurityInfo('DateTime.DateTime').declarePublic('DateTimeError')
00084     ModuleSecurityInfo('DateTime.DateTime').declarePublic('SyntaxError')
00085 
00086     # Make CopyError importable TTW
00087     ModuleSecurityInfo('OFS.CopySupport').declarePublic('CopyError')
00088 
00089     # Make DiscussionNotAllowed importable TTW
00090     ModuleSecurityInfo('Products.CMFDefault.DiscussionTool').declarePublic('DiscussionNotAllowed')
00091 
00092     # Make AllowSendto importable TTW
00093     ModuleSecurityInfo('Products.CMFPlone.PloneTool').declarePublic('AllowSendto')
00094 
00095     # Make ZCatalog's mergeResults importable TTW
00096     ModuleSecurityInfo('Products.ZCatalog.Catalog').declarePublic('mergeResults')
00097 
00098     # Make the navtree constructs available TTW
00099     allow_module('Products.CMFPlone.browser.navtree')
00100 
00101     # Allow access to the exception in the folder_delete script
00102     from OFS.ObjectManager import BeforeDeleteException
00103     allow_module('OFS.ObjectManager')
00104     allow_class(BeforeDeleteException)
00105 
00106     # Make cgi.escape available TTW
00107     ModuleSecurityInfo('cgi').declarePublic('escape')
00108 
00109     # Setup migrations
00110     import migrations
00111     migrations.executeMigrations()
00112     migrations.registerMigrations()
00113 
00114     # Inititalize configuration machinery
00115     import setup
00116 
00117     # Apply monkey patches
00118     import patches
00119 
00120     # Register unicode splitter w/ ZCTextIndex
00121     # pipeline registry
00122     import UnicodeSplitter
00123 
00124     # Register Plone skins directory
00125     from Products.CMFCore import DirectoryView
00126     DirectoryView.registerDirectory('skins', cmfplone_globals)
00127 
00128     # Plone content
00129 
00130     # LargePloneFolder is deprectated and will be removed in Plone 4.0.
00131     # Usage of PloneFolder is discouraged.
00132     import PloneFolder, LargePloneFolder
00133     import Portal
00134 
00135     contentClasses      = ( PloneFolder.PloneFolder,
00136                             LargePloneFolder.LargePloneFolder, )
00137     contentConstructors = ( PloneFolder.addPloneFolder,
00138                             LargePloneFolder.addLargePloneFolder, )
00139 
00140     # CMFCore and CMFDefault tools
00141     from Products.CMFCore import CachingPolicyManager
00142 
00143     # Plone tools
00144     import PloneTool, FactoryTool
00145     import InterfaceTool, MigrationTool, PloneControlPanel
00146     import MembershipTool, WorkflowTool, URLTool, MetadataTool
00147     import RegistrationTool, MemberDataTool, SyndicationTool
00148     import PropertiesTool, ActionsTool, TypesTool, UndoTool
00149     import CatalogTool, SkinsTool, DiscussionTool
00150     import CalendarTool, ActionIconsTool, QuickInstallerTool
00151     import GroupDataTool, GroupsTool
00152     import TranslationServiceTool
00153 
00154     tools = ( MembershipTool.MembershipTool,
00155               MemberDataTool.MemberDataTool,
00156               PloneTool.PloneTool,
00157               WorkflowTool.WorkflowTool,
00158               CachingPolicyManager.CachingPolicyManager,
00159               FactoryTool.FactoryTool,
00160               PropertiesTool.PropertiesTool,
00161               MigrationTool.MigrationTool,
00162               InterfaceTool.InterfaceTool,
00163               PloneControlPanel.PloneControlPanel,
00164               RegistrationTool.RegistrationTool,
00165               URLTool.URLTool,
00166               MetadataTool.MetadataTool,
00167               ActionsTool.ActionsTool,
00168               TypesTool.TypesTool,
00169               UndoTool.UndoTool,
00170               SyndicationTool.SyndicationTool,
00171               CatalogTool.CatalogTool,
00172               SkinsTool.SkinsTool,
00173               DiscussionTool.DiscussionTool,
00174               ActionIconsTool.ActionIconsTool,
00175               CalendarTool.CalendarTool,
00176               QuickInstallerTool.QuickInstallerTool,
00177               GroupsTool.GroupsTool,
00178               GroupDataTool.GroupDataTool,
00179               TranslationServiceTool.TranslationServiceTool,
00180             )
00181 
00182     from Products.CMFCore.utils import ContentInit
00183     from Products.CMFPlone.utils import ToolInit
00184 
00185     # Register tools and content
00186     ToolInit('Plone Tool'
00187              , tools=tools
00188              , icon='tool.gif'
00189              ).initialize( context )
00190 
00191     ContentInit('Plone Content'
00192                 , content_types=contentClasses
00193                 , permission=ADD_CONTENT_PERMISSION
00194                 , extra_constructors=contentConstructors
00195                 ).initialize( context )
00196 
00197     import factory
00198     context.registerClass(Portal.PloneSite,
00199                           constructors=(factory.addPloneSiteForm,
00200                                         factory.addPloneSite),
00201                           icon='skins/plone_images/logoIcon.gif')
00202 
# Import "PloneMessageFactory as _" to create messages in the plone domain

Variable Documentation

list CMFPlone._marker = []

Definition at line 7 of file __init__.py.

string CMFPlone.ADD_CONTENT_PERMISSION = 'Add portal content'

Definition at line 9 of file __init__.py.

tuple CMFPlone.cmfplone_globals = globals()

Definition at line 5 of file __init__.py.

dictionary CMFPlone.misc_
Initial value:
00001 {'plone_icon': Globals.ImageFile(
00002                        os.path.join('skins', 'plone_images', 'logoIcon.gif'),
00003                        cmfplone_globals)}

Definition at line 11 of file __init__.py.

tuple CMFPlone.PloneLocalesMessageFactory = MessageFactory('plonelocales')

Definition at line 208 of file __init__.py.

tuple CMFPlone.PloneMessageFactory = MessageFactory('plone')

Definition at line 204 of file __init__.py.

list CMFPlone.this_module = sys.modules[ __name__ ]

Definition at line 6 of file __init__.py.