Commit 7d8f4444 authored by Nicolas Dumazet's avatar Nicolas Dumazet

delay imports to avoid circular imports


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38667 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c5f44743
...@@ -6,7 +6,7 @@ import sys ...@@ -6,7 +6,7 @@ import sys
import inspect import inspect
from types import ModuleType from types import ModuleType
from Products.ERP5Type.patches.getSite import getSite from zope.site.hooks import getSite
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Utils import setDefaultClassProperties from Products.ERP5Type.Utils import setDefaultClassProperties
......
from Products.ERP5Type.Dynamic.portaltypeclass import synchronizeDynamicModules
from Products.ERP5Type import Globals from Products.ERP5Type import Globals
module_name = 'zope.site.hooks' module_name = 'zope.site.hooks'
try: try:
...@@ -38,5 +37,6 @@ hooks.getSite = getSite ...@@ -38,5 +37,6 @@ hooks.getSite = getSite
last_cookie_value = None last_cookie_value = None
def setSite(site=None): def setSite(site=None):
_setSite(site) _setSite(site)
from Products.ERP5Type.Dynamic.portaltypeclass import synchronizeDynamicModules
synchronizeDynamicModules(site) synchronizeDynamicModules(site)
hooks.setSite = setSite hooks.setSite = setSite
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