Commit 4ec6f185 authored by Shane Hathaway's avatar Shane Hathaway

Fixed some long-standing circular imports. The circular imports are the

reason "import Zope" is often required in unit tests.
parent b404f82a
......@@ -12,11 +12,10 @@
##############################################################################
__doc__='''Factory objects
$Id: Factory.py,v 1.26 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.26 $'[11:-2]
$Id: Factory.py,v 1.27 2003/05/14 14:43:44 shane Exp $'''
__version__='$Revision: 1.27 $'[11:-2]
import OFS.SimpleItem, Acquisition, Globals, AccessControl.Role
import Products, Product
class Factory(
AccessControl.Role.RoleManager,
......@@ -69,6 +68,7 @@ class Factory(
if REQUEST is not None: return self.manage_main(self, REQUEST)
def manage_afterAdd(self, item, container):
import Product # local to avoid circular import
if hasattr(self, 'aq_parent'):
container=self.aq_parent
elif item is not self:
......@@ -78,6 +78,7 @@ class Factory(
self._register()
def manage_beforeDelete(self, item, container):
import Product # local to avoid circular import
if hasattr(self, 'aq_parent'):
container=self.aq_parent
elif item is not self:
......
......@@ -34,19 +34,19 @@
# on restart if there is still a product directory.
import Globals, OFS.Folder, OFS.SimpleItem, os, Acquisition, Products
import re, zlib, Globals, cPickle, marshal, rotor
import ZClasses, ZClasses.ZClass, AccessControl.Owned
from urllib import quote
import os, re, zlib, marshal, rotor, cPickle
from cgi import escape
from urllib import quote
import Globals, OFS.Folder, OFS.SimpleItem, Acquisition, Products
import ZClasses, AccessControl.Owned
from OFS.Folder import Folder
from HelpSys.HelpSys import ProductHelp
from AccessControl import Unauthorized
from Factory import Factory
from Permission import PermissionManager
import ZClasses, ZClasses.ZClass
from HelpSys.HelpSys import ProductHelp
import RefreshFuncs
from AccessControl import Unauthorized
from App.config import getConfiguration
......
......@@ -15,7 +15,7 @@
import Acquisition, ExtensionClass, Globals, OFS.PropertySheets, OFS.Folder
from AccessControl.Permission import pname
import App.Dialogs, ZClasses, App.Factory, App.Product, App.ProductRegistry
import App.Dialogs, ZClasses, App.Factory, App.ProductRegistry
import ZClassOwner
from AccessControl.PermissionMapping import aqwrap, PermissionMapper
......@@ -41,8 +41,6 @@ class ZClassMethodsSheet(
######################################################################
# Hijinks to let us create factories and classes within classes.
#meta_types=App.Product.Product.meta_types
meta_types=(
{'name': 'Z Class',
'action':'manage_addZClassForm'},
......
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