[Zope3-checkins] CVS: Zope3/src/zope/app/services - pagefolder.py:1.19

Jim Fulton jim at zope.com
Wed Feb 11 02:01:20 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv12361/src/zope/app/services

Modified Files:
	pagefolder.py 
Log Message:
Adjusted the containment constraints.


=== Zope3/src/zope/app/services/pagefolder.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/services/pagefolder.py:1.18	Thu Feb  5 23:13:41 2004
+++ Zope3/src/zope/app/services/pagefolder.py	Wed Feb 11 02:01:19 2004
@@ -24,12 +24,15 @@
 from zope.fssync.server.entryadapter import ObjectEntryAdapter, AttrMapping
 from zope.app.interfaces.services.registration import ActiveStatus
 from zope.app.interfaces.services.registration import IRegistrationManager
+from zope.app.interfaces.services.registration \
+     import IRegistrationManagerContainer
 from zope.app.interfaces.services.registration import RegisteredStatus
 from zope.app.interfaces.services.registration import UnregisteredStatus
 from zope.app.interfaces.services.registration import IRegisterable
 from zope.app.container.constraints import ItemTypePrecondition
 from zope.app.services.presentation import PageRegistration
 from zope.app.services.registration import RegistrationManagerContainer
+from zope.app.container.constraints import ContainerTypesConstraint
 from zope.app.services.zpt import IZPTTemplate
 from zope.app.traversing import getPath
 from zope.app.traversing import getPath
@@ -97,7 +100,10 @@
         """Add a template to the folder
         """
 
-    __setitem__.precondition = ItemTypePrecondition(IRegisterable)
+    __setitem__.precondition = ItemTypePrecondition(IZPTTemplate)
+    
+    __parent__ = zope.schema.Field(
+        constraint = ContainerTypesConstraint(IRegistrationManagerContainer))
 
 class PageFolder(RegistrationManagerContainer, BTreeContainer):
 




More information about the Zope3-Checkins mailing list