标签:
json.dumps(log_list,default=utils.json_datetime_handler)
import time,hashlib,json import models from django.shortcuts import render,HttpResponse from MadKing import settings from django.core.exceptions import ObjectDoesNotExist def json_date_handler(obj): if hasattr(obj, ‘isoformat‘): return obj.strftime("%Y-%m-%d") def json_datetime_handler(obj): if hasattr(obj, ‘isoformat‘): return obj.strftime("%Y-%m-%d %H:%M:%S")
标签:
原文地址:http://www.cnblogs.com/zhaobin022/p/5550496.html