I did something like this too. I need to be able to show readonly fields in my forms in the same way I do in formish, so I implemented a per-field readonly flag. It works okay but it is a little cumbersome to specify which fields are readonly:
deform/field.py: def serialize(self, cstruct, readonly=False): """ Serialize the cstruct into HTML. If ``readonly`` is ``True``, render a read-only rendering (no input fields).""" - return self.widget.serialize(self, cstruct=cstruct, readonly=readonly) + return self.widget.serialize(self, cstruct=cstruct, readonly=readonly or self.readonly) -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.