DateField/TimeField returning datetime objects (not date/time objects)
|Reported by:||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||yes|
I was having problems with TimeField's and DateField's returning datetime objects instead of date objects/time objects in sql server yesterday.
This is caused by the fact that DateField and TimeField don't use the SubfieldBase metaclass so their to_python methods are never called.
When i assign the metaclass everything works fine
Change History (7)
comment:3 Changed 9 years ago by
|Summary:||to_python not being called on DateField/TimeField since they don't use Subfield metaclass → DateField/TimeField returning datetime objects (not date/time objects)|