Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
4ec6f185
Commit
4ec6f185
authored
May 14, 2003
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some long-standing circular imports. The circular imports are the
reason "import Zope" is often required in unit tests.
parent
b404f82a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
lib/python/App/Factory.py
lib/python/App/Factory.py
+4
-3
lib/python/App/Product.py
lib/python/App/Product.py
+7
-7
lib/python/ZClasses/Method.py
lib/python/ZClasses/Method.py
+1
-3
No files found.
lib/python/App/Factory.py
View file @
4ec6f185
...
...
@@ -12,11 +12,10 @@
##############################################################################
__doc__
=
'''Factory objects
$Id: Factory.py,v 1.2
6 2002/08/14 21:31:40 mj
Exp $'''
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
$Id: Factory.py,v 1.2
7 2003/05/14 14:43:44 shane
Exp $'''
__version__
=
'$Revision: 1.2
7
$'
[
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
:
...
...
lib/python/App/Product.py
View file @
4ec6f185
...
...
@@ -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
...
...
lib/python/ZClasses/Method.py
View file @
4ec6f185
...
...
@@ -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
.
Product
Registry
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'
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment