[CMF-checkins] CVS: Products/CMFCore/interfaces - portal_types.py:1.7

Tres Seaver tseaver@zope.com
Mon, 13 Aug 2001 17:44:18 -0400


Update of /cvs-repository/Products/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv7273/CMFCore/interfaces

Modified Files:
	portal_types.py 
Log Message:


 - Make tool, rather than type objects, responsible for generating
   "immediate view" URL;  type objects now return the newly-created
   object, which makes scripting them much simpler.


=== Products/CMFCore/interfaces/portal_types.py 1.6 => 1.7 ===
         """
             Build a "bare" instance of the appropriate type in
-            'container', using 'id' as its id.  Return the URL
-            of its "immediate" view (typically the metadata form).
+            'container', using 'id' as its id.  Return the instance,
+            seated in the container.
         """
 
     def allowDiscussion():
@@ -183,8 +183,10 @@
             'container'.
         """
     
-    def constructContent(contentType, container, id):
+    def constructContent(contentType, container, id, RESPONSE=None
+                        , *args, **kw):
         """
             Build an instance of the appropriate content class in
-            'container', using 'id'.
+            'container', using 'id'.  If RESPONSE is provided, redirect
+            to the new object's "initial view".
         """