[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/source.py Make source display widgets declare their implementation of IDisplayWidget--

Gary Poster gary at zope.com
Wed Apr 13 22:48:36 EDT 2005


Log message for revision 29979:
  Make source display widgets declare their implementation of IDisplayWidget--
  and implement a missing part of it, the 'required' attribute.
  
  

Changed:
  U   Zope3/trunk/src/zope/app/form/browser/source.py

-=-
Modified: Zope3/trunk/src/zope/app/form/browser/source.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/source.py	2005-04-14 02:22:38 UTC (rev 29978)
+++ Zope3/trunk/src/zope/app/form/browser/source.py	2005-04-14 02:48:34 UTC (rev 29979)
@@ -28,10 +28,14 @@
 
 class SourceDisplayWidget(zope.app.form.Widget):
 
+    zope.interface.implements(zope.app.form.interfaces.IDisplayWidget)
+
     def __init__(self, field, source, request):
         super(SourceDisplayWidget, self).__init__(field, request)
         self.source = source
 
+    required = property(lambda self: self.context.required)
+
     def hidden(self):
         return ''
 



More information about the Zope3-Checkins mailing list