[Twisted-web] s: * select-with-other quick patch for renderImmutable

Paul Reznicek maillists at ivsn.com
Sun Dec 18 13:17:42 MST 2005

Hi Matt,

Attached a quick (an dirty) solution for  renderImmutable
in  class SelectOtherChoice.
For me, it's better solution than raising an error ...

The SelectOtherChoice - widget is nice and very helpful,
Thanks !
-------------- next part --------------
Index: widget.py 
--- widget.py	(Revision 164) 
+++ widget.py	(Arbeitskopie) 
@@ -367,7 +367,9 @@ 
         return tag 
     def renderImmutable(self, ctx, key, args, errors): 
-        raise NotImplemented 
+##        raise NotImplemented 
+        return SelectChoice(self.original, zip(self.options, self.options) 
+                ).renderImmutable( ctx, key, args, errors) 
     def processInput(self, ctx, key, args): 
         value = self._valueFromRequestArgs(key, args) 

More information about the Twisted-web mailing list