Re: [SQLObject] datetime vs mx.DateTime
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Mike W. <li...@mi...> - 2004-08-11 15:16:39
|
On Wed, 2004-08-11 at 07:42, l.m.orchard wrote: > Heya - I'm wondering if there's a way that I can force SQLObject to use > datetime from the Python standard modules, as opposed to mx.DateTime? Probably. Depends. "Depends", as some DBAPI modules require mx.DateTime - psycopg, for example. If you are using a DBAPI module that can utilize the Python datetime module, you could have your own conversion override the default date/time conversion in SQLObject. To do this, create your own load point for SQLObject rather than importing everything from the module itself. i.e. mysqlobject.py: # a convenient load point for our custom hacked SQLObject from sqlobject import * from sqlobject.col import * from sqlobject.col import SOCol from sqlobject import constraints # and hack/define your own Date col type, converters. ... for you to do.. ;-) |