|
From: Oleg B. <ph...@ph...> - 2012-01-31 19:17:05
|
Hi!
On Tue, Jan 31, 2012 at 06:28:23PM +0100, Petr Jake?? wrote:
> With some luck I will check it this weekend (I can not promiss).
Eagerly waiting!
> It looks
> like it gives different results with different versions of Firebird.
> Actually I am trying to migrate TurboGears working application to an other
> machine. The Python, TurboGears, kinterbasdb, SQLObject are the same
> version. The only differences are version of Firebird and different Ubuntu
> version.
Good luck resolving this!
> I will check it. My feeling was it is not a problem to coerce str to int.
In 0.13.0 validators becomes event stricter:
* Validators became stricter: StringCol and UnicodeCol now accept only str,
unicode or an instance of a class that implements __unicode__ (but not
__str__ because every object has a __str__ method); BoolCol accepts only
bool or int or an instance of a class that implements __nonzero__; IntCol
accepts int, long or an instance of a class that implements __int__ or
__long__; FloatCol accepts float, int, long or an instance of a class
that implements __float__, __int__ or __long__.
But you can add a validator/converter to any column yourself:
from formencode.validators import Int
class MyTable(SQLobject):
column = IntCol(validator2=Int())
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|