[Checkins] SVN: z3c.form/trunk/ Reverted changes made in the previous release as the ``getContent`` method can return anything it wants to as long as a data manager can map the fields to it. So ``context`` should be used for group instantiation. In cases where ``context`` is not wanted, the group can be instantiated in the ``update`` method of its parent group or form. See also https://mail.zope.org/pipermail/zope-dev/2010-January/039334.html

Michael Howitz mh at gocept.com
Thu Jan 21 15:19:38 EST 2010


Log message for revision 108381:
  Reverted changes made in the previous release as the ``getContent`` method can return anything it wants to as long as a data manager can map the fields to it. So ``context`` should be used for group instantiation. In cases where ``context`` is not wanted, the group can be instantiated in the ``update`` method of its parent group or form. See also https://mail.zope.org/pipermail/zope-dev/2010-January/039334.html
  

Changed:
  U   z3c.form/trunk/CHANGES.txt
  U   z3c.form/trunk/src/z3c/form/group.py

-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt	2010-01-21 19:02:03 UTC (rev 108380)
+++ z3c.form/trunk/CHANGES.txt	2010-01-21 20:19:37 UTC (rev 108381)
@@ -5,9 +5,17 @@
 2.3.2 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Reverted changes made in the previous release as the ``getContent``
+  method can return anything it wants to as long as a data manager can
+  map the fields to it. So ``context`` should be used for group
+  instantiation. In cases where ``context`` is not wanted, the group
+  can be instantiated in the ``update`` method of its parent group or
+  form. See also
+  https://mail.zope.org/pipermail/zope-dev/2010-January/039334.html
 
+  (So version 2.3.2 is the same as version 2.3.0.)
 
+
 2.3.1 (2010-01-18)
 ------------------
 

Modified: z3c.form/trunk/src/z3c/form/group.py
===================================================================
--- z3c.form/trunk/src/z3c/form/group.py	2010-01-21 19:02:03 UTC (rev 108380)
+++ z3c.form/trunk/src/z3c/form/group.py	2010-01-21 20:19:37 UTC (rev 108381)
@@ -52,7 +52,7 @@
             if interfaces.IGroup.providedBy(groupClass):
                 group = groupClass
             else:
-                group = groupClass(self.getContent(), self.request, self)
+                group = groupClass(self.context, self.request, self)
             group.update()
             groups.append(group)
         self.groups = tuple(groups)
@@ -130,7 +130,7 @@
             if interfaces.IGroup.providedBy(groupClass):
                 group = groupClass
             else:
-                group = groupClass(self.getContent(), self.request, self)
+                group = groupClass(self.context, self.request, self)
             group.update()
             groups.append(group)
         self.groups = tuple(groups)



More information about the checkins mailing list