sqlite orm problem with dates
|Reported by:||leszek0140||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.2|
|Severity:||Keywords:||date, orm, sqlite|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I made sqlite database manually. I defined date field with text type. Than defined that field as DateTimeField in models.py.
Finally I had problem with dates in program and I checked that type of this attribute in model instance was unicode.
Attribute started to be datetime after I had changed in sql script "text" to "datetime" and that was solution.
This behaviour seems buggy to me. It seems that definition from models.py is more important than type in dynamically typed sqlite database.
I used Django-1.2.1-5.fc12