[CMF-checkins] CVS: CMF - Portal.py:1.14 MetadataTool.py:1.3
tseaver@digicool.com
tseaver@digicool.com
Sat, 28 Apr 2001 19:12:55 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault
In directory korak:/tmp/cvs-serv3774/CMFDefault
Modified Files:
Portal.py MetadataTool.py
Log Message:
- Store spec/policies using PersistentMapping, rather than dicts
(D'OH!).
- Add the metadata tool when generating a new portal.
--- Updated File Portal.py in package CMF --
--- Portal.py 2001/04/28 22:54:51 1.13
+++ Portal.py 2001/04/28 23:12:54 1.14
@@ -331,6 +331,7 @@
addCMFDefaultTool('Default Registration Tool', None)
addCMFDefaultTool('Default URL Tool', None)
addCMFDefaultTool('Default Properties Tool', None)
+ addCMFDefaultTool('Default Metadata Tool', None)
def setupMailHost(self, p):
p.manage_addProduct['MailHost'].manage_addMailHost(
--- Updated File MetadataTool.py in package CMF --
--- MetadataTool.py 2001/04/28 22:58:42 1.2
+++ MetadataTool.py 2001/04/28 23:12:54 1.3
@@ -89,7 +89,7 @@
import os
from OFS.SimpleItem import SimpleItem
-from Globals import InitializeClass, HTMLFile, package_home
+from Globals import InitializeClass, HTMLFile, package_home, PersistentMapping
from AccessControl import getSecurityManager, ClassSecurityInfo
from Products.CMFCore.CMFCorePermissions import View, ManagePortal
from Products.CMFCore.utils import UniqueObject
@@ -185,7 +185,7 @@
def __init__( self, is_multi_valued ):
self.is_multi_valued = is_multi_valued
- self.policies = {} # XXX: use PersistentDict?
+ self.policies = PersistentMapping()
self.policies[ None ] = self._makePolicy() # set default policy
@@ -266,7 +266,7 @@
#, validation_hook
)
- self.element_specs = {} # XXX: use PersistentDict?
+ self.element_specs = PersistentMapping()
for name, is_multi_valued in element_specs:
self.element_specs[ name ] = ElementSpec( is_multi_valued )