On Mon, Apr 09, 2007 at 02:24:17PM -0700, j j wrote:
> I am working with an existing application that uses mxDateTime therefore, I
> am wondering if there is a straightforward way to set
> default_datetime_implementation to mxDateTime

from sqlobject import *
from sqlobject import col

if mxdatetime_available:
    col.default_datetime_implementation = MXDATETIME_IMPLEMENTATION

   Do this *before* defining your classes. See test_datetime.py for an
example.

> (perhaps when configuring the connection).

   Unfortunately it is hard to reset the validator/converter based on
connection settings; so if you need two connections in one program
(SQLObject allows this), one with datetime and the other with mxDateTime,
you have to create two different classes.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to