On Tue, Jul 01, 2008 at 12:52:31PM -0500, Christopher Singley wrote:
> class Example(sqlobject.SQLObject):
> value = sqlobject.DecimalCol(size=10, precision=precision,
> validator=PreciseDecimalValidator(precision=precision))
>
> But this is very inelegant. Is there a way to use introspection instead?
I do not consider this as inelegant. But we can decide to add an
additional parameter:
class Example(sqlobject.SQLObject):
value = sqlobject.DecimalCol(size=10, precision=precision,
quantize=precision)
DecimalCol will pass the 'quantize' parameter down to the validator.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss