On Oct 16, 11:48 am, Aymeric Augustin
<aymeric.augus...@polytechnique.org> wrote:
> Hello,
>
> I've implemented the storage and retrieval of aware datetime objects in 
> SQLite. This involved some refactoring, because SQLite returns datetimes as 
> strings, and I didn't want to duplicate the parsing code. All database 
> backends are now covered.
>

Is it worth looking at registering a custom converter for SQLite
(http://docs.python.org/library/sqlite3.html#converting-sqlite-values-
to-custom-python-types) to handle the date objects? Converters can be
registered per-column - the SELECT query would need to be tweaked to
hint to the SQLite libs to call the registered converter. I'm not sure
if that would be too intrusive to the existing Django query builder.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to