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")
时间: 2024-10-10 17:17:45