Commit deb8d43f authored by Tres Seaver's avatar Tres Seaver

Move Globals-stuffing to correct point.

parent b3330120
......@@ -46,11 +46,49 @@ from zope.app import appsetup
app = None
startup_time = asctime()
def stuff_Globals():
# Stuff BBB names into the Globals module
import Globals # to set data
import TreeDisplay
Globals.TreeDisplay = TreeDisplay
import App.Common
Globals.package_home = App.Common.package_home
Globals.attrget = App.Common.attrget
Globals.Dictionary = App.Common.Dictionary
from Persistence import Persistent
from Persistence import PersistentMapping
Globals.Persistent = Persistent
Globals.PersistentMapping = PersistentMapping
from App.class_init import default__class_init__
from App.class_init import ApplicationDefaultPermissions
Globals.InitializeClass = default__class_init__
from App.special_dtml import HTML
from App.special_dtml import HTMLFile
from App.special_dtml import DTMLFile
Globals.HTML = HTML
Globals.HTMLFile = HTMLFile
Globals.DTMLFile = DTMLFile
from App.Dialogs import MessageDialog
Globals.MessageDialog = MessageDialog
from App.ImageFile import ImageFile
Globals.ImageFile = ImageFile
def startup():
from App.PersistentExtra import patchPersistent
import Globals # to set / fetch data
patchPersistent()
stuff_Globals() # XXX should this be optional?
global app
# Import products
......
......@@ -36,42 +36,6 @@ from zope.app import appsetup
logger = logging.getLogger("Zope")
started = False
def stuff_Globals():
# Stuff BBB names into the Globals module
import Globals # to set data
import TreeDisplay
Globals.TreeDisplay = TreeDisplay
import App.Common
Globals.package_home = App.Common.package_home
Globals.attrget = App.Common.attrget
Globals.Dictionary = App.Common.Dictionary
from Persistence import Persistent
from Persistence import PersistentMapping
Globals.Persistent = Persistent
Globals.PersistentMapping = PersistentMapping
from App.class_init import default__class_init__
from App.class_init import ApplicationDefaultPermissions
Globals.InitializeClass = default__class_init__
from App.special_dtml import HTML
from App.special_dtml import HTMLFile
from App.special_dtml import DTMLFile
Globals.HTML = HTML
Globals.HTMLFile = HTMLFile
Globals.DTMLFile = DTMLFile
from App.Dialogs import MessageDialog
Globals.MessageDialog = MessageDialog
from App.ImageFile import ImageFile
Globals.ImageFile = ImageFile
def get_starter():
check_python_version()
if sys.platform[:3].lower() == "win":
......@@ -86,8 +50,6 @@ def start_zope(cfg, debug_handler):
# Don't allow any code to call start_zope() twice.
return
stuff_Globals() # XXX should this be optional?
starter = get_starter()
starter.setConfiguration(cfg)
starter.prepare()
......
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