#14569: Raw query for date field returns unicode instead of datetime object in
sqlite
---------------------------------------------------+------------------------
Reporter: robin | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.2
Resolution: | Keywords: raw query
date sqlite postgresql
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by dmoisset):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
The problem here is that you're using an expression, not a column name.
The raw queryset maps all columns to the correct fields, but if you use
arbitrary expressions it lets the db value through... and sqlite has no
datetime values, just numbers and unicode strings.
--
Ticket URL: <http://code.djangoproject.com/ticket/14569#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.