Hello,
my model is ok.. I tried to debug a bit, dont know exactly what is
happening but you probably do:
what happens in sql_represent() method is that among the many "if
fieldtype == '<type>'" there is this code:
elif isinstance(obj, str):
try:
obj.decode('utf-8')
except:
obj = obj.decode('latin1').encode('utf8')
which catches up my datetime field (dunno why), and as it is an "elif"
clause it ends up not being catched by the following
"elif fieldtype == 'datetime':" code, which fixes the to_date() issue.
Hope this helps understanding what is going on..
Regards,
G.