版权声明:转载请注明出处 https://blog.csdn.net/le_17_4_6/article/details/81812960
写django时报了如下错误:
TypeError: datetime.datetime(2018, 8, 18, 19, 47, 39, 171000) is not JSON serializable
将
t.task_publish_date
改为
t.task_publish_date.strftime("%m-%d %H:%M")
问题解决。