Commit acb3d46a authored by Jean-Paul Smets's avatar Jean-Paul Smets

Import CodingStyle and add switchable LOG trace which is useful in case of...

Import CodingStyle and add switchable LOG trace which is useful in case of bootstrap issue to debug. (if this is not OK, it is OK to remove it).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32836 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 418d9e8a
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
ERP5Type is provides a RAD environment for Zope / CMF ERP5Type is provides a RAD environment for Zope / CMF
All ERP5 classes derive from ERP5Type All ERP5 classes derive from ERP5Type
""" """
from zLOG import LOG, INFO
DISPLAY_BOOT_PROCESS = False
# Switch(es) for ongoing development which require single code base # Switch(es) for ongoing development which require single code base
...@@ -68,6 +70,7 @@ def initialize( context ): ...@@ -68,6 +70,7 @@ def initialize( context ):
import Document import Document
import Base, XMLObject import Base, XMLObject
from ERP5Type import ERP5TypeInformation from ERP5Type import ERP5TypeInformation
import CodingStyle
# Define documents, classes, constructors and tools # Define documents, classes, constructors and tools
object_classes = () object_classes = ()
content_constructors = () content_constructors = ()
...@@ -91,24 +94,38 @@ def initialize( context ): ...@@ -91,24 +94,38 @@ def initialize( context ):
Products.ERP5Type.Workflow.registerAllWorkflowFactories(context) Products.ERP5Type.Workflow.registerAllWorkflowFactories(context)
# We should register local constraints at some point # We should register local constraints at some point
from Products.ERP5Type.Utils import initializeLocalConstraintRegistry from Products.ERP5Type.Utils import initializeLocalConstraintRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'initializeLocalConstraintRegistry')
initializeLocalConstraintRegistry() initializeLocalConstraintRegistry()
# We should register local property sheets at some point # We should register local property sheets at some point
from Products.ERP5Type.Utils import initializeLocalPropertySheetRegistry from Products.ERP5Type.Utils import initializeLocalPropertySheetRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'initializeLocalPropertySheetRegistry')
initializeLocalPropertySheetRegistry() initializeLocalPropertySheetRegistry()
# We should register product classes at some point # We should register product classes at some point
from Products.ERP5Type.InitGenerator import initializeProductDocumentRegistry from Products.ERP5Type.InitGenerator import initializeProductDocumentRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'initializeProductDocumentRegistry')
initializeProductDocumentRegistry() initializeProductDocumentRegistry()
# We should register local classes at some point # We should register local classes at some point
from Products.ERP5Type.Utils import initializeLocalDocumentRegistry from Products.ERP5Type.Utils import initializeLocalDocumentRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'initializeLocalDocumentRegistry')
initializeLocalDocumentRegistry() initializeLocalDocumentRegistry()
# We can now setup global interactors # We can now setup global interactors
from Products.ERP5Type.InitGenerator import initializeProductInteractorRegistry from Products.ERP5Type.InitGenerator import initializeProductInteractorRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'initializeProductInteractorRegistry')
initializeProductInteractorRegistry() initializeProductInteractorRegistry()
# And local interactors # And local interactors
from Products.ERP5Type.Utils import initializeLocalInteractorRegistry from Products.ERP5Type.Utils import initializeLocalInteractorRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'initializeLocalInteractorRegistry')
initializeLocalInteractorRegistry() initializeLocalInteractorRegistry()
# We can now install all interactors # We can now install all interactors
from Products.ERP5Type.InitGenerator import installInteractorClassRegistry from Products.ERP5Type.InitGenerator import installInteractorClassRegistry
if DISPLAY_BOOT_PROCESS:
LOG('ERP5Type.__init__', INFO, 'installInteractorClassRegistry')
installInteractorClassRegistry() installInteractorClassRegistry()
from AccessControl.SecurityInfo import allow_module from AccessControl.SecurityInfo import allow_module
...@@ -126,7 +143,6 @@ ModuleSecurityInfo('Products.ERP5Type.Message').declarePublic('translateString') ...@@ -126,7 +143,6 @@ ModuleSecurityInfo('Products.ERP5Type.Message').declarePublic('translateString')
allow_module('Products.ERP5Type.Error') allow_module('Products.ERP5Type.Error')
allow_module('Products.ERP5Type.JSONEncoder') allow_module('Products.ERP5Type.JSONEncoder')
allow_module('Products.ERP5Type.Log') allow_module('Products.ERP5Type.Log')
allow_module('Products.ERP5Type.ConnectionPlugin.SOAPWSDLConnection')
ModuleSecurityInfo('Products.ERP5Type.JSON').declarePublic('dumps', 'loads') ModuleSecurityInfo('Products.ERP5Type.JSON').declarePublic('dumps', 'loads')
ModuleSecurityInfo('pprint').declarePublic('pformat', 'pprint') ModuleSecurityInfo('pprint').declarePublic('pformat', 'pprint')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment