Django JSON 时间

在views.py中导入:

from django.core.serializers.json import DjangoJSONEncoder

在返回JSON数据时调用:

return HttpResponse(json.dumps(json_dict, cls=DjangoJSONEncoder))
原文地址:https://www.cnblogs.com/yestreenstars/p/6369323.html