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
726e7bbd
Commit
726e7bbd
authored
Apr 01, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to try to allow classes and factories within classes, but it may not
work out.
parent
b66a75b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lib/python/App/ProductRegistry.py
lib/python/App/ProductRegistry.py
+7
-2
No files found.
lib/python/App/ProductRegistry.py
View file @
726e7bbd
...
...
@@ -114,6 +114,9 @@ class ProductRegistryMixin:
r
.
append
(
mt
)
self
.
_setProductRegistryMetaTypes
(
tuple
(
r
))
def
_constructor_prefix_string
(
self
,
pid
):
return
'manage_addProduct/%s/'
%
pid
def
_manage_add_product_meta_type
(
self
,
product
,
id
,
meta_type
,
permission
=
''
):
...
...
@@ -127,13 +130,15 @@ class ProductRegistryMixin:
if
mt
[
'product'
]
!=
pid
:
raise
'Type Exists'
,
(
'The type <em>%s</em> is already defined.'
%
meta_type
)
mt
[
'action'
]
=
'manage_addProduct/%s/%s'
%
(
pid
,
id
)
mt
[
'action'
]
=
'%s%s'
%
(
self
.
_constructor_prefix_string
(
pid
),
id
)
if
permission
:
mt
[
'permission'
]
=
permission
return
mt
=
{
'name'
:
meta_type
,
'action'
:
(
'manage_addProduct/%s/%s'
%
(
pid
,
id
)),
'action'
:
(
'%s%s'
%
(
self
.
_constructor_prefix_string
(
pid
),
id
)),
'product'
:
pid
}
if
permission
:
mt
[
'permission'
]
=
permission
...
...
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