I’m very new to django, maybe I’m asking something very elemental.
I have the following code :
crush.time = request.POST['time']
this ‘time’ post value is a timefield and I need to process as a time value, but all I got is that crush.time is a string, and then I got the following error when I try to process:
'unicode' object has no attribute 'hour'
Just use the Python
datetimelibrary to convert to a time object: