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
4e290cc0
Commit
4e290cc0
authored
Dec 02, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a creation option to suppress inclusion of Zope framework base classes.
parent
b617dfd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
lib/python/ZClasses/ZClass.py
lib/python/ZClasses/ZClass.py
+9
-5
lib/python/ZClasses/ZClassOwner.py
lib/python/ZClasses/ZClassOwner.py
+5
-3
No files found.
lib/python/ZClasses/ZClass.py
View file @
4e290cc0
...
...
@@ -100,7 +100,8 @@ class PersistentClass(Base):
manage_addZClassForm
=
Globals
.
HTMLFile
(
'addZClass'
,
globals
(),
default_class_
=
'OFS.SimpleItem Item'
,
CreateAFactory
=
1
)
CreateAFactory
=
1
,
zope_object
=
1
)
def
find_class
(
ob
,
name
):
...
...
@@ -124,7 +125,8 @@ def dbVersionEquals(ver):
def
manage_addZClass
(
self
,
id
,
title
=
''
,
baseclasses
=
[],
meta_type
=
''
,
CreateAFactory
=
0
,
REQUEST
=
None
):
meta_type
=
''
,
CreateAFactory
=
0
,
REQUEST
=
None
,
zope_object
=
0
):
"""Add a Z Class
"""
bases
=
[]
...
...
@@ -136,7 +138,7 @@ def manage_addZClass(self, id, title='', baseclasses=[],
bases
.
append
(
base
)
Z
=
ZClass
(
id
,
title
,
bases
)
Z
=
ZClass
(
id
,
title
,
bases
,
zope_object
=
zope_object
)
if
meta_type
:
Z
.
_zclass_
.
meta_type
=
meta_type
self
.
_setObject
(
id
,
Z
)
...
...
@@ -221,7 +223,7 @@ class ZClass(OFS.SimpleItem.SimpleItem):
(
''
,
'__call__'
,
'index_html'
,
'createInObjectManager'
)),
)
def
__init__
(
self
,
id
,
title
,
bases
):
def
__init__
(
self
,
id
,
title
,
bases
,
zope_object
=
1
):
"""Build a Zope class
A Zope class is *really* a meta-class that manages an
...
...
@@ -251,7 +253,9 @@ class ZClass(OFS.SimpleItem.SimpleItem):
isheets_base_classes
.
append
(
psc
)
except
AttributeError
:
pass
base_classes
.
append
(
OFS
.
SimpleItem
.
SimpleItem
)
if
zope_object
:
base_classes
.
append
(
OFS
.
SimpleItem
.
SimpleItem
)
zsheets_base_classes
.
append
(
ZClassSheets
)
isheets_base_classes
.
append
(
Property
.
ZInstanceSheets
)
...
...
lib/python/ZClasses/ZClassOwner.py
View file @
4e290cc0
...
...
@@ -90,14 +90,16 @@ class ZClassOwner(ExtensionClass.Base):
manage_addZClassForm
=
Globals
.
HTMLFile
(
'addZClass'
,
globals
(),
default_class_
=
'OFS.SimpleItem Item'
,
CreateAFactory
=
1
)
CreateAFactory
=
1
,
zope_object
=
1
)
def
manage_addZClass
(
self
,
id
,
title
=
''
,
baseclasses
=
[],
meta_type
=
''
,
CreateAFactory
=
0
,
REQUEST
=
None
):
REQUEST
=
None
,
zope_object
=
0
):
"Add a ZClass"
return
ZClass
.
manage_addZClass
(
self
,
id
,
title
,
baseclasses
,
meta_type
,
CreateAFactory
,
REQUEST
)
self
,
id
,
title
,
baseclasses
,
meta_type
,
CreateAFactory
,
REQUEST
,
zope_object
=
zope_object
)
def
manage_subclassableClassNames
(
self
):
r
=
{}
...
...
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