[Twisted-web] Problem using 'immutable' attribute in form field.

Dave Cook daverz at gmail.com
Sat Feb 26 19:41:54 MST 2005


I'd like to use an immutable field for a database row ID:

class IMyForm(annotate.TypedInterface):
    def recording(self,
                  request=annotate.Request(),
                  recording_id=annotate.Integer(label='Recording ID',
                                                immutable=True,
                                                default=999
                                                ),
                  ...
                  ):
        pass
        
    recording = annotate.autocallable(recording, action='Save')

...

Then in my page this is implemented with:

    def recording(self, request, **kw):
         # do stuff with kw

However, if I use 'immutable', kw['recording_id'] is always None.  If
I remove the immutable attribute it works fine, but I don't want the
user editing the row ID.



More information about the Twisted-web mailing list