Oleg Broytmann, el 16 de abril a las 23:06 me escribiste: > On Mon, Apr 16, 2007 at 03:59:11PM -0300, Leandro Lucarella wrote: > > > class GzipFilter(validators.Validator): > > > def from_python(self, value, state): > > > return compress(value) > > > > > > def to_python(self, value, state): > > > return decompress(value) > > > > > > class MyTable(SQLObject): > > > bob = PickleCol(validator=GzipFilter()) > > > > There you go, this is great! =) > > That's untested schematic code, of course.
But the PickleCol(validator=Something) works, right? > > I didn't know you can add validators to a Column this way... > > SQLObject has a lot of hidden gems... And I will expose them as I discover them ;) http://sourceforge.net/tracker/index.php?func=detail&aid=1701949&group_id=74338&atid=540674 -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ .------------------------------------------------------------------------, \ GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05 / '--------------------------------------------------------------------' All men are born equal But quite a few get over it ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss