[Checkins] SVN: grok/branches/0.10/ * Fix https://bugs.launchpad.net/grok/+bug/162437: grok.Form and its

Philipp von Weitershausen philikon at philikon.de
Mon Dec 3 10:36:36 EST 2007


Log message for revision 82097:
  * Fix https://bugs.launchpad.net/grok/+bug/162437: grok.Form and its
    subclasses did not implement IBrowserView.
  
  

Changed:
  U   grok/branches/0.10/CHANGES.txt
  U   grok/branches/0.10/src/grok/interfaces.py
  U   grok/branches/0.10/src/grok/tests/form/form.py

-=-
Modified: grok/branches/0.10/CHANGES.txt
===================================================================
--- grok/branches/0.10/CHANGES.txt	2007-12-03 15:00:50 UTC (rev 82096)
+++ grok/branches/0.10/CHANGES.txt	2007-12-03 15:36:35 UTC (rev 82097)
@@ -4,8 +4,12 @@
 0.10.3
 ======
 
-* ...
+Bug fixes
+---------
 
+* Fix https://bugs.launchpad.net/grok/+bug/162437: grok.Form and its
+  subclasses did not implement IBrowserView.
+
 0.10.2 (2007-10-24)
 ===================
 

Modified: grok/branches/0.10/src/grok/interfaces.py
===================================================================
--- grok/branches/0.10/src/grok/interfaces.py	2007-12-03 15:00:50 UTC (rev 82096)
+++ grok/branches/0.10/src/grok/interfaces.py	2007-12-03 15:36:35 UTC (rev 82097)
@@ -14,7 +14,7 @@
 """Grok interfaces
 """
 from zope import interface, schema
-from zope.publisher.interfaces.browser import IBrowserPage
+from zope.publisher.interfaces.browser import IBrowserPage, IBrowserView
 from zope.formlib.interfaces import reConstraint
 
 class IGrokBaseClasses(interface.Interface):
@@ -237,7 +237,7 @@
         """
 
 
-class IGrokView(IBrowserPage):
+class IGrokView(IBrowserPage, IBrowserView):
     """Grok views all provide this interface."""
 
     context = interface.Attribute('context', "Object that the view presents.")

Modified: grok/branches/0.10/src/grok/tests/form/form.py
===================================================================
--- grok/branches/0.10/src/grok/tests/form/form.py	2007-12-03 15:00:50 UTC (rev 82096)
+++ grok/branches/0.10/src/grok/tests/form/form.py	2007-12-03 15:36:35 UTC (rev 82097)
@@ -23,7 +23,7 @@
     ...
   AttributeError: 'Cave' object has no attribute 'ignored'
 
-A grok.EditForm is a special grok.View that renders an edit form.
+A grok.EditForm is a special view that renders an edit form.
 
   >>> from zope import component
   >>> from zope.publisher.browser import TestRequest
@@ -34,6 +34,15 @@
   >>> [w.__name__ for w in view.form_fields]
   ['name', 'size']
 
+Let's assert that forms are indeed Zope 3-style browser views and
+browser pages:
+
+  >>> from zope.publisher.interfaces.browser import IBrowserPage, IBrowserView
+  >>> IBrowserPage.providedBy(view)
+  True
+  >>> IBrowserView.providedBy(view)
+  True
+
 It is important to keep the order of the fields:
 
   >>> view = component.getMultiAdapter(



More information about the Checkins mailing list