[CMF-checkins] CVS: CMF/CMFSetup - interfaces.py:1.20
registry.py:1.20
Yvo Schubbe
y.2005- at wcm-solutions.de
Sun Mar 20 16:20:17 EST 2005
Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv7748/CMFSetup
Modified Files:
interfaces.py registry.py
Log Message:
- made profile ID a combination of profile name and product ID
- removed product name from existing profile names
=== CMF/CMFSetup/interfaces.py 1.19 => 1.20 ===
--- CMF/CMFSetup/interfaces.py:1.19 Wed Mar 16 03:22:34 2005
+++ CMF/CMFSetup/interfaces.py Sun Mar 20 16:19:47 2005
@@ -364,16 +364,16 @@
o See 'getProfileInfo' for a description of the mappings' keys.
"""
- def registerProfile( profile_id
+ def registerProfile( name
, title
, description
, path
, product=None
, profile_type=BASE
):
- """ Add a new profile to tne registry.
+ """ Add a new profile to the registry.
- o If an existing profile is already registered for 'profile_id',
+ o If an existing profile is already registered for 'product:name',
raise KeyError.
o If 'product' is passed, then 'path' should be interpreted as
=== CMF/CMFSetup/registry.py 1.19 => 1.20 ===
--- CMF/CMFSetup/registry.py:1.19 Wed Mar 16 03:22:34 2005
+++ CMF/CMFSetup/registry.py Sun Mar 20 16:19:47 2005
@@ -553,7 +553,7 @@
security.declareProtected( ManagePortal, 'registerProfile' )
def registerProfile( self
- , profile_id
+ , name
, title
, description
, path
@@ -562,6 +562,7 @@
):
""" See IProfileRegistry.
"""
+ profile_id = '%s:%s' % (product or 'other', name)
if self._profile_info.get( profile_id ) is not None:
raise KeyError, 'Duplicate profile ID: %s' % profile_id
More information about the CMF-checkins
mailing list