[CMF-checkins] CVS: CMF - TypesTool.py:1.9

tseaver@digicool.com tseaver@digicool.com
Wed, 11 Apr 2001 18:01:51 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak:/tmp/cvs-serv2354/CMFCore

Modified Files:
	TypesTool.py 
Log Message:


 - Extend TypesTool to deal appropriately with DTML factory methods
    (e.g., for ZClasses).



--- Updated File TypesTool.py in package CMF --
--- TypesTool.py	2001/04/08 19:18:09	1.8
+++ TypesTool.py	2001/04/11 22:01:49	1.9
@@ -470,7 +470,11 @@
         if m is None:
             raise 'Unauthorized', ('Cannot create %s' % self.getId())
         id = str(id)
-        apply(m, (id,) + args, kw)
+        if getattr( m, 'isDocTemp', 0 ):
+            kw[ 'id' ] = id
+            apply( m, ( container, self.REQUEST ) + args, kw )
+        else:
+            apply(m, (id,) + args, kw)
         ob = container._getOb(id)
         if hasattr(ob, '_setPortalTypeName'):
             ob._setPortalTypeName(self.getId())